from the information-(and-operating-environments)-want-to-be-free! dept.
Last week, FreeDOS turned 25 years old. FreeDOS is a complete, Free Software Disk Operating System (DOS) and a drop-in replacement for MS-DOS which has disappeared long ago. It is still used in certain niche cases such as playing legacy games, running legacy software, or certain embedded systems. Back in the day, it was also quite useful for updating BIOS.
Of those that will be, are, or have been using it, what tasks has it been good for?
Also, at:
The Linux Journal : FreeDOS's Linux Roots
OpenSource.com : FreeDOS turns 25 years old: An origin story
OS News : FreeDOS’s Linux roots
Lilliputing : FreeDOS turns 25 (open source, DOS-compatible operating system)
Earlier on SN:
Jim Hall on FreeDOS and the Upcoming 1.2 Release (2016)
Retro-Malware: DOS TSRs, Interrupt Handlers, and Far Calls, Part 2 (2016)
Retro-Malware: Writing A Keylogger for DOS, Part 1 (2016)
Related Stories
I've made no secret that I'd like to bring original content to SoylentNews, and recently polled the community on their feelings for crowdfunding articles. The overall response was somewhat lukewarm mostly on dividing where money and paying authors. As such, taking that into account, I decided to write a series of articles for SN in an attempt to drive more subscriptions and readers to the site, and to scratch a personal itch on doing a retro-computing project. The question then became: What to write?
As part of a conversation on IRC, part of me wondered what a modern day keylogger would have looked running on DOS. In the world of 2016, its no secret that various three letter agencies engage in mass surveillance and cyberwarfare. A keylogger would be part of any basic set of attack tools. The question is what would a potential attack tool have looked like if it was written during the 1980s. Back in 1980, the world was a very different place both from a networking and programming perspective.
For example, in 1988 (the year I was born), the IBM PC/XT and AT would have been a relatively common fixture, and the PS/2 only recently released. Most of the personal computing market ran some version of DOS, networking (which was rare) frequently took the form of Token Ring or ARCNet equipment. Further up the stack, TCP/IP competed with IPX, NetBIOS, and several other protocols for dominance. From the programming side, coding for DOS is very different that any modern platform as you had to deal with Intel's segmented architecture, and interacting directly with both the BIOS, and hardware. As such its an interesting look at how technology has evolved since.
Now obviously, I don't want to release a ready-made attack tool to be abused for the masses especially since DOS is still frequently used in embedded and industry roles. As such, I'm going to target a non-IP based protocol for logging both to explore these technologies, while simultaneously making it as useless as possible. To the extent possible, I will try and keep everything accessible to non-programmers, but this isn't intended as a tutorial for real mode programming. As such I'm not going to go super in-depth in places, but will try to link relevant information. If anyone is confused, post a comment, and I'll answer questions or edit these articles as they go live.
More past the break ...
The Retro-Malware series is an experiment on original content for SoylentNews, written in the hopes to motivate people to subscribe to the site and help grow our resources. The previous article talked a bit about the programming environment imposed by DOS and 16-bit Intel segmented programming; it should be read before this one.
Before we get into this installment, I do want to apologize for the delay into getting this article up. A semi-unexpected cross-country drive combined with a distinct lack of surviving programming documentation has made getting this article written up take far longer than expected. Picking up from where we were before, today we're going to look into Terminate-and-Stay Resident programming, interrupt chaining, and get our first taste of how DOS handles conventional memory. Full annotated code and binaries are available here in the retromalware git repo.
In This Article
- What Are TSRs
- Interrupt Handlers And Chaining
- Calling Conventions
- Walking through an example TSR
- Help Wanted
As usual, check past the break for more. In addition, if you are a licensed ham operator or have ham radio equipment, I could use your help, check the details at the end of this article.
[Continues...]
Via FOSS Force, the founder and coordinator of the FreeDOS Project writes about FreeDOS 1.2:
Tim Norman wrote our first command interpreter to replace COMMAND.COM from standard DOS. Soon after, Pat Villani contributed his DOS-compatible kernel, which others later improved to add networking and CD-ROM support. We released our first "Alpha" distribution in only a few months, in September 1994. From this small beginning grew FreeDOS, an open source implementation of DOS that anyone could use.
We released several alpha versions over the next four years, then posted our first beta in 1998. By this time, Microsoft had all but eliminated MS-DOS, so FreeDOS didn't have to chase a moving target and shifting compatibility with new MS-DOS versions.
[...] We posted the FreeDOS 1.0 distribution on September 3, 2006, and released FreeDOS 1.1 over five years later, on January 2, 2012.
[...] Big-name computer vendors like Dell and HP shipped it as a default operating system on some PC desktops and laptops. Even today, you can find popular manufacturers pre-installing FreeDOS on some computers. But the story doesn't end there. Soon, we'll have a whole new version of FreeDOS--and I'd like to tell you about it.
[...] The Utilities package group includes several new useful tools. For those who use FreeDOS to play classic DOS games, we provide SLOWDOWN to let you run certain older games on a fast CPU. We provide several image processing programs such as GIFSICLE and PNGCRUSH. If you wish for a more Unix-like environment, we also include several familiar commands such as SED, GREP, HEAD, TEE, and BC.
[...] One major change is the inclusion of a new Games package group. We've avoided games in previous FreeDOS distributions, but since so many people prefer FreeDOS to play their favorite classic DOS games, it seemed a good idea to include a variety of open source games from different genres.
[...] The official FreeDOS 1.2 distribution will be available on Sunday, December 25, 2016.
In the comments there, someone mentions the popularity of FreeDOS for doing firmware updates. (It always seemed crazy to me to be running a multitasking OS when doing something that has the potential to brick your box.)
Any Soylentils using FreeDOS for that or something other than that?
Two big things happened in the world of text-based disk operating systems in June 1994.
The first is that Microsoft released MS-DOS version 6.22, the last version of its long-running operating system that would be sold to consumers as a standalone product. MS-DOS would continue to evolve for a few years after this, but only as an increasingly invisible loading mechanism for Windows.
The second was that a developer named Jim Hall wrote a post announcing something called "PD-DOS."
PD-DOS would soon be renamed FreeDOS, and 30 years and many contributions later, it stands as the last MS-DOS-compatible operating system still under active development.
[...] To mark FreeDOS' 20th anniversary in 2014, we talked with Hall and other FreeDOS maintainers about its continued relevance, the legacy of DOS, and the developers' since-abandoned plans to add ambitious modern features like multitasking and built-in networking support (we also tried, earnestly but with mixed success, to do a modern day's work using only FreeDOS).
[...] For the 30th anniversary, we've checked in with Hall again about how the last decade or so has treated the FreeDOS project, why it's still important, and how it continues to draw new users into the fold. We also talked, strange as it might seem, about what the future might hold for this inherently backward-looking operating system.
[...] "Compared to about 10 years ago, I'd say the interest level in FreeDOS is about the same," Hall told Ars in an email interview. "Our developer community has remained about the same over that time, I think. And judging by the emails that people send me to ask questions, or the new folks I see asking questions on our freedos-user or freedos-devel email lists, or the people talking about FreeDOS on the Facebook group and other forums, I'd say there are still about the same number of people who are participating in the FreeDOS community in some way."
[...] Though it's still being downloaded and used, shifts in PC hardware are making it more difficult to install and run FreeDOS directly on a new PC.
[...] One issue is the UEFI firmware used to boot modern PCs. UEFI began replacing the traditional PC BIOS at the tail end of the 2000s, and today, it's the default mechanism used for booting Windows, macOS, and Linux, though Windows and Linux both technically can still boot on non-UEFI systems.
(Score: 0) by Anonymous Coward on Tuesday July 02 2019, @03:14PM (3 children)
it's good to practice running linux as root all the time.
also it's good to use to program a tcp/ip stack for itself ...
(Score: 1, Funny) by Anonymous Coward on Tuesday July 02 2019, @04:03PM
It is, but most people are boring and use existing solutions for TCP/IP and USB. Pff.. losers.
(Score: 2) by DannyB on Tuesday July 02 2019, @04:53PM
DOS is not quite like running Linux as root. DOS has this additional fine quality that an ordinary DOS 'user space' program has full access to all of the hardware.
Police can legally stop you for having too much tent on your window.
(Score: 0) by Anonymous Coward on Tuesday July 02 2019, @10:57PM
KA9Q [wikipedia.org] FTW!
(Score: 2, Interesting) by Anonymous Coward on Tuesday July 02 2019, @03:42PM (1 child)
DOS has a programming API developed by Microsoft..
(Score: 3, Interesting) by shortscreen on Wednesday July 03 2019, @12:37AM
Didn't Microsoft just base their API on CP/M or something though?
Oddly enough, I noticed that DOS calls on the Sharp X68000 use many of the same function numbers as MS-DOS int 21h calls. Except for some reason they decided to pass parameters on the stack and then the caller has to fix the stack pointer afterward.
(Score: 3, Funny) by DECbot on Tuesday July 02 2019, @03:43PM (7 children)
cats~$ sudo chown -R us /home/base
(Score: 3, Interesting) by Anonymous Coward on Tuesday July 02 2019, @04:33PM (1 child)
3. ???
How about running simple programs (offline) at blinding speed, for example real time controllers?
We did this back in the day, had a data collection system that used interrupts, it also put up a "quick look" display when it wasn't actually looking at the data acquisition cards.
I guess the way it's done these days is to throw extra hardware at the problem and have the real time stuff run on it's own.
(Score: 5, Informative) by DannyB on Tuesday July 02 2019, @05:10PM
You could use a micro controller. When, when not otherwise occupied with real time, could send updates via serial through to a USB port of a computer running a common non-realtime OS.
But the price of micro controllers. Just consider the prices of microprocessors . . .
Creative Computing [archive.org], July 1980 . . . pg 33 . . . remembering way back to what 1975 was like . . .
So here we are today where you can get a system on a tiny circuit board that plugs into a breadboard. And is way more computer than most systems of that day.
To be on topic: FreeDOS would have seemed like a dream compared to the CP/M. (MS-DOS did not yet exist)
Police can legally stop you for having too much tent on your window.
(Score: 2, Touché) by Anonymous Coward on Tuesday July 02 2019, @04:34PM
5. deltree c:windows
(Score: 2) by DannyB on Tuesday July 02 2019, @04:54PM (2 children)
FreeDOS might be good as a way to distribute BIOS updates?
Police can legally stop you for having too much tent on your window.
(Score: 5, Interesting) by PartTimeZombie on Tuesday July 02 2019, @10:42PM (1 child)
That is pretty much all I have ever used it for.
I have these [nicegear.nz] running pfSense as firewalls around the joint. FreeDOS seems to be the easiest way to update their bios.
(Score: 2) by DannyB on Wednesday July 03 2019, @01:34PM
FreeDOS was good as a choice that OEMs could offer when Microsoft's Windows agreements required all OEMs to only sell hardware with an OS pre-installed. Because a machine without an OS obviously must be intended for someone to install a pirated copy of Windows.
The machine could come with FreeDOS, and then the end user could wipe it and install whatever they had intended to install on a machine that doesn't have an OS preinstalled.
Police can legally stop you for having too much tent on your window.
(Score: 2) by Gaaark on Tuesday July 02 2019, @06:51PM
I run i3 on Linux for that: the wife hasn't a clue what to do with it, lol.
--- Please remind me if I haven't been civil to you: I'm channeling MDC. ---Gaaark 2.0 ---
(Score: 0) by Anonymous Coward on Wednesday July 03 2019, @07:21PM
i know someone that uses it for an ancient bookkeeping app.