FreeDOS Blog

❮ Back

March, 2020

Updates on FreeDOS

I haven't written in the FreeDOS blog for a while. As you probably know, I changed jobs in April last year; I now own a consulting company. But I still want to work on FreeDOS too - and with everyone's support on Patreon, I've been able to take time away from my consulting to continue work on FreeDOS.

Over on the FreeDOS Patreon, I've talked about all the extra work I've been doing for FreeDOS. Here's a quick recap:

I've updated the FreeDOS website. The old website was "okay" but it definitely needed an update. The new website is easier to read and easier to navigate. You should find it much easier to find the information you're looking for.

I've been making videos about FreeDOS. Check out our FreeDOS channel on YouTube for weekly videos about FreeDOS, and about DOS applications and games. These are getting better over time, thanks to your comments and suggestions.

I'm updating the FreeDOS Wiki. The FreeDOS wiki needs to be updated. Some of the information is old or out of date, other pages are just hard to find. So I'm updating the wiki with new content, updating older pages, and generally making things better.

I'm updating the FreeDOS bug tracker. Many FreeDOS programs and utilities have longstanding bugs. But many of these bugs have since been fixed, and no one updated the bug tracker. I'm starting to go through the bug tracker to remove any stale bugs that no longer apply. I've also started updating the one-line description of the bugs (the "title") so it's easier to find bugs that match an actual problem. For example: I'm changing bugs like "problem with DIR" to something like "DIR does not insert newline before summary info."

The Wiki is getting the most attention from me right now, since that's the next Goal on the FreeDOS Patreon. (Patreon has "Goals" for each funding level.) The Goals I've set on the FreeDOS Patreon are:

  • $100/mo - start making videos (done)
  • $200/mo - update the FreeDOS website (done)
  • $300/mo - update the FreeDOS wiki (in progress)
  • $500/mo - update the FreeDOS bug tracker (started)
  • $750/mo - port Unix and Linux utils to FreeDOS
  • $1000/mo - write new programs and games for FreeDOS

Let's watch some videos!

We have a FreeDOS channel on YouTube. I post weekly videos about FreeDOS, or demo'ing some of my favorite DOS applications and games.

I realized that I should be talking about these videos here, on the FreeDOS Blog! With every video, I'll go into more detail on the blog about each program or game. Maybe I'll share some trivia, or post extra screenshots. For the videos where I discuss programming, I'll try to include sample code that you can copy and paste into your own FreeDOS environment.

We've posted about twenty-five videos so far on the FreeDOS channel. I'll start a regular blog series here where I talk about them. Expect a few per week until I catch up, then weekly as each video is posted.

I'll post the first video tomorrow. Let's watch some videos together!

Navigating FreeDOS - CD and DIR (with video)

Welcome to the new video series about FreeDOS! I'll be covering some useful and quick tips for getting the most out of FreeDOS.

For this first video, I wanted to show the basics of getting around.

You can break down any DOS system as files and directories. The very first versions of DOS didn't support subdirectories; this was added in MS-DOS version 2.

Let's look at the standard DOS prompt, so you can see where you are during the video. The first letter is the drive letter. Modern DOS systems probably boot to the first partition on the first hard drive, or the C drive. (The colon is not actually part of the drive's name; that's just a separator—but people usually write it as C: anyway.)

When you boot your system, you will be at the "root" directory, or "top level" directory. You'll see this represented as \ in the prompt.

The > in the prompt is the actual command prompt. That's where you type your commands.

To see the files in the current directory, type the DIR command. This generates a listing of all the files and subdirectories of where you are. You can also give DIR a path to show instead, such as


To navigate to different directories, you use the CD command ("Change Directory"). It's common to change the directory one level at a time, so you might type CD DATA if DATA is a subdirectory in your current directory. You can also give a full path, such as

And with that, you're ready to explore the FreeDOS command line!

Navigating FreeDOS - FDCONFIG.SYS

If you're new to FreeDOS, you may wonder "How does FreeDOS start up?" And how can you control what FreeDOS is doing during boot?

To learn that, let's examine the FDCONFIG.SYS file:

FDCONFIG.SYS (or just CONFIG.SYS on MS-DOS) is the configuration file for the DOS kernel. It's what tells the kernel what to load when it boots, and what things it should do during start-up.

In it's simplest form, FDCONFIG.SYS can just be a list of simple configuration entries:


Those lines tell the FreeDOS kernel about how it should set up the system. For example, it sets the DOSDIR environment variable to C:\FDOS, so FreeDOS knows where to find other files. The last drive letter is set to Z. At the end, this simple FDCONFIG.SYS loads the COMMAND.COM program as the interactive command shell (called FreeCOM on FreeDOS) as a permanent (/P) shell that loads the C:\AUTOEXEC.BAT file when it starts up.

You can control other things that happen during the boot process. FreeDOS lets you present a boot menu to the user; that's where the MENU entries and numbers come in. For example, 124?DOS=HIGH loads DOS=HIGH only when the user selects menu items 1, 2, or 4.

DOS applications - VisiCalc

My favorite DOS application is a spreadsheet. So let's take a look at the first desktop spreadsheet application, Visicalc.

VisiCalc was the brainchild of Dan Bricklin and Bob Frankston. While there were other programs that let you perform calculations, these were not very interactive, and you needed an expensive computer system to run them.

Dan and Bob envisioned a new kind of program that let you interactively enter numbers on a grid, and perform calculations with them. This was the first desktop spreadsheet application. VisiCalc was released in 1979 for the Apple II computer. VisiCalc was so immediately popular that many businesses purchased Apple II computers just to run VisiCalc.

You can see in the video that Visicalc—while it's quite old—is still easily recognizable as a spreadsheet program. VisiCalc is similar to modern spreadsheets; you enter numbers on a grid labeled with letters for columns and numbers as rows. So your first cell is A1, B1, C1, and so on. In column A, your cells are A1, A2, A3, and so on.

The reason VisiCalc looks so much like modern spreadsheets is because that's how software lineage often works. VisiCalc was the dominant spreadsheet program until upstart company Lotus released Lotus 1-2-3. And Lotus 1-2-3 was able to take that market share because 1-2-3 looked and acted like VisiCalc, while adding new features. Then Quattro Pro took away the Lotus 1-2-3 market before Microsoft Excel for Windows took the market from Quattro Pro.

So each successive program borrowed certain elements (including look and feel) from its predecessor, while adding new features. As you look at modern spreadsheets like LibreOffice Calc or Microsoft Excel, you'll see echoes of VisiCalc.

You can download VisiCalc for free! Find it at Dan Bricklin's VisiCalc website.

Navigating FreeDOS - EDIT

The text editor is probably one of the most useful parts of any operating system. In FreeDOS, the default text editor is the FreeDOS EDIT program.

FreeDOS EDIT (by Joe Cosentino) includes more advanced features than the MS-DOS Editor. In FreeDOS EDIT, you can find a simple calendar, useful for project planning. Programmers will also find a handy ASCII character table. Find both the calendar and ASCII table under the "Utilities" menu.

You'll also find simple word processing features in FreeDOS EDIT, like changing the case (uppercase and lowercase) of text, or showing the statistics of a selection block, or setting line wrap.

I encourage you to try FreeDOS EDIT and explore the menus. You can access everything from the keyboard by tapping the Alt key on your keyboard. Or if you have a mouse, you can use the mouse to click on each menu.

DOS programming - ECHO and TYPE

If you're new to programming, this how-to video is for you. Let's explore how to write some simple FreeDOS utilities, using C.

I think the easiest programs to demonstrate are ECHO and TYPE.

In the video, I walk through how to write a simple ECHO command, which is a great first example when you're learning to write C prorgams. The ECHO command just prints the command line arguments it was given (it echoes them back to the user). In FreeDOS, ECHO is an internal command, so it's part of the COMMAND.COM shell. But for this programming example, we'll write our own version of ECHO as an external command (a standalone EXE or COM program).

Every C program starts with a few lines to include parts of the C library:

#include <stdio.h>
#include <stdlib.h>

The stdio.h file contains definitions for functions that do input or output (called "I/O"). The stdlib.h file contains definitions for other parts of the C standard library of functions (hence "lib" is short for "library").

Now let's write a program to perform the ECHO command. In C, the main part of the program is the main function.
#include <stdio.h>
#include <stdlib.h>

main (int argc, char **argv)
  int i;
  for (i = 1; i < argc; i++)

    printf ("%s ", argv[i]);
  putchar ('\n');
  exit (0);

A few things in that example:

The command line is represented as argc and argv. The argc value is the argument count. This tells the program how many arguments came to the program. And argv is the argument vector that contains a list of strings on the command line. A string would be defined as char *, because char * defines a pointer to a string value. But since this is a list of strings, you need another * to indicate the pointer to the list. That's why you get char ** instead of just char *. Some older programs might instead use char *argv[].

The for loop runs through all arguments starting at position 1. That's because the "0th" entry in argv is actually the program's name. We want to print all arguments after the program's name, so we start at position 1.

The i++ is shorthand to increment by 1. You could have instead written i=i+1 and that would have been fine here. But I learned it as i++, so that's how I write it. On a similar note, i-- is similar to i=i-1. If you use the ++ and -- notation, note that ++i and i++ are subtly different.

The printf() function is a formatted print statement. The quoted string as its first argument is the format that printf() uses. Here, %s means to print a string. You can also use %d to print an integer (decimal, as opposed to some other number format like binary).

End the program with exit() or return(). You can use return() to exit the main() function, but I learned C in an earlier standard, so I prefer to exit the program using exit(). In the main() function, both do the same thing.


So you've installed FreeDOS, but you don't see the program that you need. How can you install programs on FreeDOS?

There are actually two ways to install programs on FreeDOS.

1. Install it manually

This is usually pretty straightforward, because unlike on some other operating systems, DOS programs are statically linked. That means you can just install that program and everything should be fine - in almost all cases. There are very few instances where one program depends on another. But for most programs and games, you can just install it and you're off.

Once you find the program and download it, you usually just need to extract the archive. Most programs are distributed as zip files, so you just need to unzip the program. Look for the EXE or COM program inside that.

Larger DOS programs and many games require an "Install" process. Look for an INSTALL.EXE or a SETUP.EXE program to run. This should be a simple process of following the prompts.

2. Install it as a package

FreeDOS includes lots of programs and games in the FreeDOS distribution. Each program is contained in a package. Starting with FreeDOS 1.2, we include other "extras" on the install CD. These extras are not installed as part of the regular FreeDOS installation—otherwise, that would be way too big. Instead, you need to install these programs after installing FreeDOS.

FreeDOS 1.2 (and the upcoming FreeDOS 1.3) uses a package manager program called FreeDOS Installer—My Package List Editor Software. Or FDIMPLES for short.

And here's how to use FDIMPLES to install these extra packages:

Comments are turned off

Sorry, but I've had to turn off comments for the FreeDOS blog. Every day, I spend a ton of time just deleting spam comments.

If you'd like to contribute to the conversation about FreeDOS, I encourage you to subscribe to our FreeDOS email lists, or join us on Facebook.

Navigating FreeDOS - FreeDOS for Linux users

If you've come to FreeDOS via Linux, you may be slightly confused about some of the commands in FreeDOS. In this quick guide, I'll provide a few "translations" to help Linux users quickly adapt to FreeDOS.

On Linux, you use the ls command to display a list of files in a directory. To get details of each file in the list, you use the ls -l command, where -l provides a long version of the output.

On FreeDOS, use the DIR command. That's very similar to ls -l. To get something similar to the plain ls command, give DIR a few options to put it into "bare" mode (/B) with lowercase letters (/L) using a wide display (/W). By default, DIR does not sort the output, so you'll need to instruct DIR to order the output (/O…) by grouping directories first (G) then sorting by base filename (N) and extension (E).


And we can create an alias for this using the built-in FreeDOS ALIAS command:

On Linux, to change to new directories and paths, you use the cd command. It's the same under FreeDOS.

On Linux, you use mkdir and rmdir to create and delete directories. These commands also exist on FreeDOS.

On Linux, to display a file, you use cat. On FreeDOS, you need to use a different command, TYPE. The usage is basically the same:
TYPE filename.txt

(Note that Linux Bash has a completely different type command.)

On Linux, you can send the output of cat into more or less to display the contents one screenful at a time. The same idea exists under FreeDOS. You can use the vertical bar as a "pipe" to different commands.
TYPE filename.txt | MORE

And you can direct output into a file using the greater-than symbol, the same as on Linux:
TYPE filename.txt > newfile.txt

I hope this helps our Linux users get started on FreeDOS.

DOS applications - As-Easy-As

DOS was king of the office, and what's more "office" than a spreadsheet? My favorite spreadsheet on DOS was the As-Easy-As spreadsheet, by TRIUS Software. As-Easy-As was a shareware program; you could download it, and try it before you bought it.

Registration for shareware programs was usually pretty expensive, typically less than $100. And when most commercial software like Lotus 1-2-3 could cost $300 to $500, depending on the application, that's a pretty good deal!

As-Easy-As provided a similar look and feel to Lotus 1-2-3. The 1-2-3 spreadsheet dominated the DOS office environment. So it was important for As-Easy-As to work just like Lotus 1-2-3, and be as easy as 1-2-3 to use. (Do you see what I did there?)

In this video demonstration, I show how to use As-Easy-As spreadsheet to calculate your grade in a class. I did this all the time when I was an undergraduate student. The spreadsheet helped me stay organized, and track my progress throughout the semester. Today, your course management software will track and report your progress for you. In the 1980s and 1990s, you had to calculate your progress yourself.

Note how As-Easy-As uses a different way to to start calculations. If you want to make a reference to another cell, you have to use notation like +A2+1 to add 1 to the value in A2. The + makes it look like a calculation, so A2 is correctly interpreted as a cell reference and not as plain text. This was common across all DOS spreadsheets at the time. Today's spreadsheets use the equal sign to denote calculations, so you would use =A2+1 instead.

Also note that As-Easy-As uses the @ sign to indicate functions. This was also common in all DOS spreadsheets. To calculate a sum over a range from B1 to B15, you enter @SUM(B1..B15). But modern spreadsheets are able to understand function names, so you do not use the @ sign today.

You can download As-Easy-As for free! Thanks to TRIUS for providing the DOS version of As-Easy-As at no cost. This is technically freeware, not open source software. You can find the download and the free activation code on the TRIUS As-Easy-As forum.

Using FreeDOS - Getting sound to work

DOS doesn't support "drivers" in the same way that other operating systems do. For example, on Windows, if you install a new sound card on your system, you usually need to install a software driver to make it work. Once you do that, all other Windows programs and games will be able to use sound.

That's because Windows and other operating systems like Linux and Mac use some level of hardware abstraction to separate the programs from the hardware. On modern systems, games talk to the sound driver and the driver talks to the sound card. With that model, it's much easier to write games without having to worry (too much) about what hardware the user is running.

But DOS predated that concept. On DOS, programs and games talked directly to the hardware. That means when you install a new game, you probably have to configure it to talk to your sound card. The most popular sound card at the time was the SoundBlaster card. And the most popular SoundBlaster model was the SoundBlaster-16. There were a few other sound card manufacturers out there, and some provided their own ways for software to send sound events to the sound card. But it was common for other sound cards to adopt compatibility with SB16.

All of this means that when you install a game on FreeDOS, you'll need to configure the sound yourself. Because FreeDOS is just DOS, and DOS programs and games talked to the sound hardware directly, we can't provide "emulation" of a sound card.

There are a few tricks to getting sound to work. Here's a quick demo using DOOM, the popular first person shooter:

Many people use a PC emulator to run FreeDOS these days. This is a very safe way to run FreeDOS, and we recommend it. To get sound to work in your DOS games, you'll need to make sure your PC emulator or virtual machine is providing a virtual sound card that DOS supports. Look for SoundBlaster-16 for a sound card, and AdLib for digital music. That's the most common configuration from the 1990s.

Once you've set up your PC emulator, you will need to know the parameters for DOS applications to communicate directly to the sound hardware. The values you need to know are: DMA, IRQ, and I/O.

Direct Memory Access (D)
Usually has a value of 1 or 5

Interrupt Request (I)
Usually has a value of 5

I/O Address (A)
Usually has an address of 0x220 or 0x240.

You can set this in a DOS environment variable called BLASTER, to help most DOS games look up the sound card values. We set a value for you as part of the default FreeDOS install, so you should see this value on your FreeDOS 1.2 or 1.3RC system:

BLASTER=A220 I5 D1 H5 P330

With that value set, most PC emulators should "just work," provided you have defined a SoundBlaster-16 or compatible sound card.