Tuesday, April 20, 2010

10 years since Phil Katz

Did you know that last week was the 10th anniversary of the death of Phil Katz? For those who don't know, Phil invented the ZIP file format, including the popular PKZIP and PKUNZIP toolset. Perhaps his greatest contribution is that Phil released the ZIP file format as an open standard, which meant anyone could write their own tools to put data in ZIP files. FreeDOS uses InfoZip to manage ZIP files, for example.

Phil battled alcoholism for much of his life, and on April 14 2000, Phil was found dead in his hotel room due to complications related to alcoholism. A pity it all turned out badly for Phil. We'll miss him.

La Stampa posted an article (in Italian, see Google's translation) describing a bit of Phil's life. You can also read more at Wikipedia.

Friday, April 2, 2010

Where FreeDOS came from

FreeDOS was previously known as "Free-DOS" and originally as "PD-DOS." For a little trip down memory lane: In 1994, I was a physics student at the University of Wisconsin-River Falls. Most of my work for school had been done using DOS - writing programs, dialing up to the university computer, network, analysing lab data, etc. I really loved DOS; I did everything with it. I had a '386 desktop system in my dorm room and an XT laptop that I would carry around with me to do work "on the go".

I liked the simplicity that DOS offered. As a DOS user, you have the equivalent of 'root' access on your computer. Anything that you want to do on the PC is possible. Nothing is really stopping you, other than hardware limitations. I found that this additional degree of freedom was nice to have, although since I worked in both environments (UNIX and DOS) I tended to write programs that stuck to "safe areas" that worked on both platforms. DOS was great.

But that year, there was an announcement that Microsoft would stop support for DOS, that a new version of Windows was going to be released that completely removed DOS from the picture. Of course, this was Windows 95, and it still did have DOS, but at that time we all had the vision that Microsoft was trying to kill our favorite operating system. Everyone was pretty shocked. We didn't want to be forced to use Windows, which completely removes the command line. In DOS, everything is done on the command line, and a true command line "guru" can do amazing things there. In Windows, you are stuck with the mouse, and if the menus don't let you do something, it pretty much can't be done. So things were looking pretty bleak. We were all very upset about Microsoft's decision to ditch the DOS platform.

Then, I saw a discussion thread on the DOS groups asking "hey, why doesn't someone write their own free version of DOS?" Remember, this was about three years after Linus Torvalds announced his work on the Linux kernel, and by 1993 Linux had shown that free software can achieve incredible results. So in 1994, the suggestion that we could write our own free version of DOS, and give it away with the source code so others could work with it and improve it, really didn't sound all that far-fetched.

Unfortunately, no one seemed to pick up the ball. The idea sort of sat there, waiting. So I sat down one weekend and hacked out code for a bunch of DOS file utilities. I posted what I had done to the DOS newsgroups, and announced that I intended to form a group on the Internet to write our own free version of DOS.

I took the opportunity to fix some things. There are some things about what Microsoft did with DOS that do irk me. The biggest is that MS-DOS commands lack options, not that there are lots of MS-DOS commands anyway. I wanted to have more powerful tools than what MS-DOS provided me with. So I hacked some of my own. (I wasn't a strong C programmer at the time, so this wasn't very beautiful code.) There were several "beta" pre-release packages of my stuff:
0.10
contained a few basic utilities, just to get the easy ones out of the way: clear (like Cls), echo, more, rem, type, ver, wait (like Pause)

0.11
added date, test (some do-nothing test program), time

0.12
added choose

0.13
fixes and some cleanup

0.14
added tee (like UNIX 'tee(1)')

0.15
added bgc (sets background color), fgc (sets foreground color), man (like UNIX 'man(1)') …

1.0
clear replaced by cls, man replaced by help, wait replaced by pause, bgc and fgc moved into cls. Added del, find, reboot, unix2dos.
After I'd written over a dozen utilities that replaced MS-DOS commands, and found some public domain source that implemented other functionality, I realized that you could reproduce what MS-DOS does and make it a free software project. So I decided to go for it.

PD-DOS was announced to the world on June 28, 1994. To cement my ideas, I created a PD-DOS Manifesto. By July 24, 1994, the name of the project had officially changed to "Free-DOS", though the name actually switched around July 16, 1994 (the revision date on the manifesto).

It immediately became a popular idea. Within a few weeks, I had several coders from various parts who contacted me, wanted to take on this or that part of the new Free-DOS. Weeks after that, the number had doubled. Within months, I was contacted by Pat Villani, who had already written a functional DOS kernel called DOS/NT, and who was willing to release it under the GNU GPL for us to use! Tim Norman also started work on his version of the Free-DOS command.com, which is the heart of the DOS command line interface. I think the fact that, early on, we had access to a working DOS kernel and command.com really helped get the Free-DOS project in motion.

I can't pinpoint exactly when "Free-DOS" became "FreeDOS," but we have called ourselves "FreeDOS" (without the dash) since sometime in early 1996. The name change has become a bit of a FreeDOS myth: Free-DOS had become so popular, that R+D Books agreed to publish a book about Pat Villani's DOS kernel, entitled The FreeDOS Kernel. Popular belief is that Pat's editor thought the dash wouldn't look right on a book cover, so he dropped it! I stopped using the dash between January 31, 1998 and February 15, 1998.

On September 3, 2006, FreeDOS reached the "1.0" milestone.

DOS will be around for quite some time yet. DOS remains a great environment to work in if you are building an embedded system, for example. The operating system is light, so it will run well in a device that doesn't have a lot of memory. You can burn it into ROM, boot from a floppy, or a small micro-drive. There aren't many operating systems that you can find these days that will boot from a floppy, yet still leave you enough room on the disk for your embedded program and maybe some room for data files.