Friday, June 23, 2017

Guest post: Joining FreeDOS

Erwin Waterlander shares this story about first starting with FreeDOS:

I have good memories of DOS. In the end of the Eighties and the first half of the Nineties, I used it mainly for playing games and text processing. Around 1996, I started my programming hobby on MS-DOS. Like many, I didn't like that MS-DOS was going to be deprecated. I used MS-DOS until about 1999 when I started using Windows 98SE.

Via Usenet, I learned about the FreeDOS Project, probably around 1997. For several years, I was on the FreeDOS mailing list. It was nice to see there was a large community of DOS enthusiasts. This kept me supporting the DOS platform.

I contributed my wcd program ("Wherever Change Directory") to the FreeDOS utilities since 1998. Later, after 2009, I added dos2unix to the FreeDOS Project. The community gave me lots of useful feedback.

I ran FreeDOS 1.0 in QEMU, and now I run FreeDOS 1.2 in VirtualBox. I have to admit that after 1999, I did most of my programming for DOS in a Command Prompt on 32-bit Windows, because that worked for me. And I have used DOSBox for gaming. I use FreeDOS nowadays only for porting my programs. I will keep on supporting FreeDOS as long as I can.

-Erwin Waterlander

Guest post: First contributions to FreeDOS

Gregory Pietsch shares his story about how he contributed first contributed to FreeDOS:

I stumbled across FreeDOS around 1998 or so. At the time, I was familiar with MS-DOS, having used it since 1985 or so, and thought, "Okay, this group wants to build a GPL'ed clone of MS-DOS, it shouldn't be too hard." I decided to contribute a couple of programs. One of them, named "Code", is an encoder/decoder for uuencode/uudecode/xxencode/xxdecode. I thought it was useful.

A few years later, I got more ambitious. I wanted to get something in the Base distro with my name on it. I noticed that base was missing a version of Edlin, the line editor from the early days of MS-DOS. I figured, who cares if nobody uses this program anymore, that's my ticket into Base. Of course, I had to write it along different lines than the original. The original was in tight Assembler, so I wrote mine in C. After several false starts and a week of programming, I finally had something that was usable, and sent it in as FreeDOS Edlin 1.0.

Since then, I have debugged FreeDOS Edlin when I've needed to and attempted to add internationalization to it with varying degrees of success. I also made it easy to take apart. A programmer could use the back end of Edlin as the back end of Edit or reuse the string and array handling bits if they wanted to.

Also, every time I upgraded Edlin, the new version came with a note written by me from the perspective of a TASS editorialist proclaiming that Edlin was the linchpin holding FreeDOS together. It was the least I could do.

By the way, the development environment I use for this and other programs nowadays is Cygwin. That's why FreeDOS Edlin is successfully autoconf'ed. I figure, is there an easier way to make a distribution than "make dist"?

-Gregory Pietsch

Guest post: Discovering FreeDOS

User "N2KMaster" contributed his story about discovering FreeDOS, and how FreeDOS inspired him to turn his programming hobby into a GUI project.

I grew up with DOS. Remember a good many days freezing my butt off waiting for the wood stove to heat up the room the old Tandy 1000 EX was in, in order to play the latest shareware diskettes Mom had gotten in the mail. It wasn't until I starting poking around with GW-BASIC that I really "got" what a computer is all about. And since all my friends had NES and I had Tandy, I had to improvise and started making my own games. That was like thirty years ago.

I knew of FreeDOS. I just never tore the hood off it and looked at it until a friend of mine gave me a pile of computer "garbage." In that pile was a retro ‘486 laptop:

It wasn't much, but that was the point. I wanted a dinosaur.

It was ancient, but then again so am I and thought, "Okay great, retro DOS machine!" However, with a busted diskette and CD-ROM drive, DOS wasn't going to be an option here. No USB, no network, "yup … this is gonna suck … hey … there's that FreeDOS thing."

I was able to install FreeDOS to the hard drive using a laptop ATA-USB converter. I booted the computer, saw the installer, and was like "Whoa! This is a little more advanced than what I was expecting."

And the giggle point with that is the hard drive is actually out of a PowerPC Apple laptop that refused to work for me.

I got it all installed and then said, "Well, I'm not much for gaming, so for a majority of the time it will be just sitting there. So how do I make it so I wanna use this thing all the time?" That's where something special started.

Two years picking at QBasic and FreeDOS just to find that "sweet spot" for developing. I finally had that "something special" and began using it to build a GUI based desktop. And unlike Windows and the other guys, I wanted it to look different.

Now that GUI desktop is over two years old and still being developed thanks to FreeDOS still being a thing. Proves DOS is still cool, still has value. And as a kid who grew up during the whole "PC versus Mac" era in its prime. There was a lot of code and software that just simply vanished because Windows became the standard and made everyone lazy. They no longer wanted to know how it worked, just make it work. And that's a shame because the developing from that era was some of the best in its day and it was an art form as well back then.

This blog post is shared under the Creative Commons Attribution 4.0 International license (CC BY).

Thursday, June 22, 2017

How to write your FreeDOS story

We have one week to go before the 23rd anniversary of FreeDOS! It's not that "23" is a significant number, but this year we decided to ask people to tell their FreeDOS story as part of a month-long FreeDOS Blog Challenge. How do you use FreeDOS? How did you get started with FreeDOS? Why did you first run FreeDOS?

We've posted stories from several folks who shared how they used FreeDOS or contributed to FreeDOS. Please add your voice to the mix!

Maybe you want to submit something, but you're unsure if it would be interesting?
I guarantee that we will find it interesting! I love to see how people are using FreeDOS. People use FreeDOS in any number of ways. We find most people use FreeDOS to play classic DOS games, or to run legacy software, or to do embedded development. If you've used FreeDOS to do any of these things, that's a FreeDOS story we want to hear!

Or maybe you've used FreeDOS to do something else. For example, you might have needed to update the BIOS on your computer, and needed to boot from DOS, so you turned to FreeDOS. That's a FreeDOS story we want to hear!

The bottom line is people use FreeDOS for different things. It doesn't matter how you use FreeDOS, we want to hear your story! Everything is interesting to us. Other FreeDOS users will read your story and think "hey, I can try that too" and FreeDOS developers will appreciate knowing that you found FreeDOS useful.
Maybe you want to write something, but you're not a developer so you think you shouldn't?
We want to hear from everyone! It's not just about developers, or people who contribute to FreeDOS.

For example, did you install FreeDOS so you could load an old DOS program to retrieve some data? I used to work in higher education, and one of our faculty once asked if we could read some research data from an old data file he created long ago. The data file was from an old DOS program, so we installed FreeDOS on a spare PC, found a copy of the original DOS program, and used it to read the data and export it into a text file. That's an interesting story!

Or maybe you used FreeDOS to explore some classic DOS programs, and bask in the fond glow of nostalgia. I used to use a shareware spreadsheet program called AsEasyAs when I was an undergraduate student, and every few years I have an irresistible urge to install AsEasyAs and run some data. If you do something similar, tell us your story!

Or maybe you wanted to set up an old PC to run classic DOS games, and you needed to install a version of DOS, and discovered FreeDOS that way. That's a great story, and we want to hear it!
But how do you write a story?
If you don't often write for a blog, then writing your FreeDOS story might seem a little daunting. But really, it's easy!

I recommend you write your story as though you were emailing your story to a good friend. If it helps, write a draft in your email program, so you can convince yourself you're emailing someone about using FreeDOS. (And if you like, you can actually send that email message to me, at jhall@freedos… and I'll use it as a guest post.)

Start by describing what you wanted to do. "I wanted to set up a gaming computer to play DOS games." Or "I wanted to compare what it's like to write using a modern spreadsheet, compared to a classic DOS program like Lotus 1-2-3." Or "I found an old file that my dad had written in a DOS word processor, but I needed the original DOS program to read it."

Maybe that was your first introduction to FreeDOS. How did you discover FreeDOS? "I googled for 'free DOS' and found the FreeDOS website." Or "A friend recommended that I use FreeDOS to do it."

Did you install FreeDOS? What was that like?

Finally, talk about what it was like to use FreeDOS, especially if this was your first time. "I thought the installer was really easy to use." Or "It was a blast to use the DOS command line again." Or "I had a hard time remembering what the commands did, but the HELP program reminded me what everything did."

That's your FreeDOS story! It doesn't have to be very long. Don't worry about length. Maybe your story is short—that's okay. If you have a lot to say about FreeDOS, that's great too. If you're looking for a word-count target, maybe shoot for 600–800 words. That might seem like a lot, but when you tell your FreeDOS story as though you were describing it to a friend, you'll find 600 words goes by very quickly. So don't let the word-count get in the way of your story. Just tell us your story, and we'll be happy to use it.

If you have your own blog or website, post your story on your blog, and email me to let me know where to find your article. If you don't have your own blog, I would be happy to post it for you as a "guest post" here. I'll even do light editing for you and take care of formatting.

Wednesday, June 21, 2017

One more week to write your FreeDOS story

In another week, on June 29, FreeDOS will turn 23 years old. That's pretty good for a 16-bit DOS operating system in 2017. And there's still more to do with FreeDOS.

For this year's anniversary, I thought it would be great to have people everywhere tell their story about FreeDOS. How did you discover FreeDOS? Why do you use FreeDOS? How do you run FreeDOS? What programs do you run on FreeDOS?

So earlier this month, I started a FreeDOS Blog Challenge. I'm asking you to write a blog post about your FreeDOS story. Post an article on your own blog by June 28. That's only a week away!

If you have your own blog or website, post your story on your blog, and email me to let me know where to find your article. I'll include it in a special blog post on June 29.

If you don't have your own blog, that's okay! I would be happy to post it for you as a "guest post" here.

One more thing: Please contribute your story under the Creative Commons Attribution 4.0 license (CC-BY). You can do this very simply, such as including a statement at the end along the lines of "This blog post is shared under the Creative Commons Attribution 4.0 International license (CC BY)."

Tuesday, June 20, 2017

Pat's FreeDOS story

Longtime FreeDOSers may recognize the name Pat Villani. For our newer members, Pasquale "Pat" Villani created the FreeDOS kernel, the core of the FreeDOS operating system. Sadly, Pat passed away in August 2011.

Pat and I were good friends. Although we never met in person, we chatted on the phone several times, and lots and lots of email conversations, half the time about FreeDOS and half about just anything. And since Pat isn't here to share his FreeDOS story, I thought I could attempt to retell his story as best I can.

To start, I'll quote Pat's own words from his Open Source Depot website, where he shared the history of his DOS kernel experiment, which later became the FreeDOS kernel.

DOS-C started in 1988 as an experiment in writing device drivers in C for Microsoft's MS-DOS. Both block and character device drivers were written, along with special C data structures to match the MS-DOS request packet. It was then recognized that using the same techniques, an operating system could be written that would take advantage of the C language features and would require much less time to develop than the traditional assembly language techniques. Although UNIX had proven this earlier, it was not tried with a traditional PC operating system.

At this time, a minimal operating system using the device drivers written earlier along with a new 8086 interrupt API was developed. It was called XDOS and proved to be a functional operating system. This new operating system was used to develop booting techniques and a C library SDK was developed for it.

XDOS enhancements were started in 1989 and MS-DOS was chosen as the new API. A more advanced architecture was also developed. This included the use of an IPL (intermediate program loader) to set up the operating environment prior to loading the operating system itself and reentrant system calls facilitating real-time applications. This version, know as NSS-DOS, was completed and demonstrated in 1991. As a result of these demonstrations, NSS was approached to supply source license for this operating system by a major defense contractor. The only new requirement - it had to run on 68K processors.

This presented a new challenge. Due to the MS-DOS model used for the API, NSS-DOS relied heavily on a segmented architecture. To meet this challenge, a major redesign of NSS-DOS was undertaken. New proprietary techniques were developed that allowed the same source to be compiled on a variety of hosts and with a wide range of compilers. This new version, DOS/NT, was the result of this new project. The kernel was redesigned as a micro kernel along with logical separation of the file system, memory and task managers. A new DOS API was designed along with a new DOS SDK to guarantee portability. Additionally, all processor unique code was separated from the core functions. The result is the highly portable operating system that DOS/NT represents.

After a number of successful commercial applications, DOS/NT became part of both dosemu and FreeDOS.

I'll pick it up from there, to fill in some details on how Pat's kernel became the FreeDOS kernel.

Pat wanted to contribute his kernel to an open source software project that would find it useful. I think it was late 1994 that Pat emailed the DOSEMU folks, asking if they were interested in his DOS-compatible kernel. I mentioned Pat's story briefly in a 1998 interview with Interface magazine. The DOSEMU team thought Pat's kernel was really interesting, but they also mentioned that a "Free-DOS Project" (at the time, our name still had the hyphen) had recently been started, and that project needed a kernel. The DOSEMU developers helped Pat get in touch with me.

Pat had created a DOS-like kernel that was feature-complete with earlier versions of MS-DOS, like MS-DOS 4 or 3.3. And Pat had licensed his kernel under the GNU General Public License, which meant we could include it in FreeDOS!

We immediately adopted Pat's kernel as the new FreeDOS kernel. Over time, other developers contributed to the FreeDOS kernel, including Aitor Santamaria, Arkady Belousov, Bernd Blaauwm Brian Reifsnyder, Charles Dye, Eduardo Casino, Eric Auer, Geraldo Netto, Jason Hood, Luchezar Georgiev, Ron Cemer, ror4, Steffen Kaiser, Tom Ehlert, and others. Some volunteered as kernel maintainers, including Jeremy Davis, Bart Oldeman, Jim Tabor, John Price. Among these many names, I'd like to give special kudos to Jim Tabor, who forklifted our kernel to support network redirection. Without this feature, FreeDOS would not have network and CD-ROM support.

In early 1996, Pat wrote a book about the FreeDOS kernel, describing its development and function, by way of teaching others how to create a DOS-compatible kernel. You can still find Pat's book on various booksellers, including Amazon: FreeDOS Kernel; An MS-DOS Emulator for Platform Independence and Embedded Systems Development.

Monday, June 19, 2017

Guest post: Hobby programming with FreeDOS

Dr Owain Kenway responded to the FreeDOS Blog Challenge by sharing his story about installing FreeDOS on a netbook, so he could do more hobby programming. You can read Owain's story here:

FreeDOS - Not just for updating your BIOS »

Owain uses his FreeDOS laptop to write interesting Fortran programs, and has a photo of Conway's Game of Life, and a snippet of code from a program to calculate Pi. And as someone who used to write a lot of programs in F77 (my first compiled language) it was great to see Owain's samples.

In reading Owain's story, I especially loved his description of how modern we've made the latest version of FreeDOS (I credit the many folks who helped assemble the FreeDOS 1.2 distribution):

Well it’s mostly a machine for doing some hobby programming in Fortran. It is ideal for the task as it’s extremely portable, but also because it’s stress and distraction free: I don’t have twitter in prodding me in the background. No e-mail or youtube videos to distract. I don’t really have to worry about security or updates as it’s not connected to any networks. Instead I can focus on writing code.

Perhaps the biggest surprise is how modern and easy to use the system is for software development. The workflow for coding on the machine is different from what I do on Linux only in that I don’t have git available. Even though I’m using compilers from the 90s, a user interface from the 80s and Vim. Both FreeDOS’s shell and 4DOS have tab completion (although it works differently from bash). If you really need them, Unix-style tools are available. Watcom’s wmake is a fairly adequate implementation of make. As a result I’ve tackled my first largish F77 project (I’ve always used F90 + whatever add-ons the compiler I’m using has) pretty successfully

Thanks, Owain!