Saturday, June 22, 2019

My first FreeDOS utilities

On June 29, the FreeDOS Project will officially turn 25 years old! That's a major milestone by any reckoning, and to celebrate we're making June our FreeDOS celebration month.
Following up on the story of how FreeDOS got started, I mentioned that I wrote my own DOS extensions, and I re-used several of these as the first FreeDOS utilities.

When I made that first release, I made the naive assumption that FreeDOS would likely work in three separate teams: a Kernel team, a Shell team, and a Utilities team.

With that first assumption, I collected several of my DOS-alike commands into a single package called "Util." I assumed we would continue to add other programs to "Util" over time. In fact, everyone contributed their own programs independently; it didn't make sense to follow the "teams" model.

But let's go back and look at the original "Util" release. You can find this at ibiblio.

If the code looks amateurish, please remember that I was still a university physics student when I wrote these. I didn't have any real experience as a programmer. I had taught myself programming, and some of these early programs show that.

Util 1.0 included these utilities:

Used ANSI to clear the screen or set color. For example, cls white on blue would clear the screen and set the text colors to grey text on a blue background. Or cls bright yellow on cyan would do the same with bright yellow text on a cyan background.
The standard utility to display the date and allow the user to change it.
Erases one or more files or directories. Using /S would recursively delete subdirectories, but would ask first unless you added the /F option.
Locates a string in one or more text files and prints them. Using /C would simply count the lines that contained the string. The /I option ignored case sensitivity. /N numbered the displayed lines, and /V would "invert" the search to display lines that did not contain the string.
A viewer for Help files. This was intentionally similar to Unix man, and even used a HELPPATH variable to set the locations of the Help files, and PAGER to set the viewer program.
Displays one or more files, pausing at each screenful. A pretty simple program.
Displays a prompt to the screen and waits for the user to press a key before it exits. The /R option returned the key pressed as an ASCII code.
A program to do a "warm" or "cold" reboot of the computer. Based on public domain code from Mike O'Carroll.
Similar to Unix tee, this acts as a filter and saves a copy of its input to a file, while also printing to standard output. Looking at this years later, there are much simpler ways to write this program.
Similar to DATE, the standard utility to display the current time and allow the user to change it.
This is one of those programs that started out as an extended DOS program I'd written for myself, then repurposed it for FreeDOS. The standard TYPE command displays a text file. This version of TYPE can also number the output with the /N option, or squeeze together non-blank lines using /S. You can show special characters, such as control characters with the /C option, ends of lines with the /E option, and tabs using /T. The /A ("All") option was the same as /N/C/E/T. And you can convert case: change everything to uppercase using /U and to lowercase using the /L option.
Converts a text file from Unix format to DOS format. This was especially useful for me because I was working in Linux most of the time, and booting into MS-DOS to run the applications that I needed. Converting text files was very handy.
A simple utility to display a hard-coded version number of the FreeDOS utilities. Since this was very early in FreeDOS history, the project was still called "Free-DOS" (with the hyphen).

There's a code comment that developers should refer to us as "Free-DOS" and not "FreeDOS" because another group got started about the same time as us (a few days after us, I think) and used the name "Freedos." Their project had different goals; I don't remember exactly, but I think they wanted to write everything in Assembly, and I wanted to be more flexible. We standardized on C and Assembly for any FreeDOS "Base" utilities, and generally let developers choose their own programming language for other extended utilities.
There's lots more history to share, and throughout June I hope to write about FreeDOS history and various milestones. Please join me in making June our FreeDOS celebration month!


  1. You always provide quality based posts, enjoy reading your work. os 2 warp

  2. This comment has been removed by the author.

  3. Hi There,
    Thank you for sharing knowledgeable blog with us I hope that you will post many more blog with us :
    We have the most comprehensive guide on choosing the best blogging platform and we have the good detailed comparison guide on all major blogging sites in whole USA and our blog is on the basis of shutdown unix command, brocade zoning commands, types of zoning in san, cisco zoning commands, vmax3 provisioning steps, snapvx, san zoning, unix flavors, timefinder snapvx, san storage explained, storage provisioning steps, emc snapvx, san zoning, symsg commands, how to backup brocade switch config, snapvx step by step, vmax snapvx, san zoning steps, gatekeeper device, zoning explained, emc vmax3, vsan vs zoning, dell emc vmax3, difference between vmax and vmax3, thin provisioning explained, data sovereignty requirements.
    Click here for more information:- unix flavors

  4. Hi There,
    Thank you for sharing knowledgeable blog with us I hope that you will post many more blog with us :
    The most comprehensive guide on choosing the best blogging platform. We have the good detailed comparison guide on all major blogging sites.Click here for How to backup brocade switch config

  5. Hi There,
    Thank you so much for the post you do and also I like your post,we have a well-detailed comparison guide on all major blogging sites and the most comprehensive guide on choosing the best blogging platform, here you can see VMware vSAN 6.6 Technical Overview.
    Click here for Read more

  6. Wow! this is Amazing! Do you know your hidden name meaning ? Click here to find your hidden name meaning