How FreeDOS Grew Up and Became a Modern DOS (2021)
cloudsavvyit.com
cloudsavvyit.com
One of my laptops came with FreeDOS preinstalled, and it was about € 50,- cheaper than the version with Windows. Being a Linux person, I gladly took the discount.
I did run into a use case where FreeDOS was insufficient, though - in my last job, our automation people were maintaining an industrial plant whose SCADA software ran on DOS. I have no clue what they did, but apparently it would only run well on MS-DOS. One of our engineers suspected that timing issues regarding the serial port played a role, but in the end, we never found out. I installed MS-DOS 6.22 on two machines, and that was the end of it.
I got a kick out of it, though. Imagine installing an early 1990s OS on late 1990s hardware in ~2016.
Microsoft and Bill Gates built their position on pure evil.
To answer the grand-parent-post, they got a license per CPU because the retailers _agreed_ to that model.
MS would argue that every cpu sold ran an MS operating system (legal or illegal) so licensing the CPU made it cheaper for legit users (ie lower price) and pirate users ultimately paid as well.
This left other OSs out in the cold but the number of actual legit users installing something else was a rounding error.
Shops could _choose_ to just sell dos or windows when the customer wanted it, but they paid a higher price via that model, so few (if any) shops went that way.
MS certainly played lots of dirty tricks but OEM pricing is not really dirty, it's just sensible business when you have that sort of market dominance and your software is pirated so heavily.
I fix it for you:
Had to agree otherwise not a single Windows license for your company in your lifetime for a reasonable price anymore.
That the choice for retailers is an obvious one is neither here nor there. They had a choice and clearly they wanted to sell Windows, so the choice is obvious.
You might not like their choice, you might not like Windows, but this is bog standard business stuff.
Something that might seem like a usual business practice to a small fish like you or me, might be illegal for a monopoly.
Microsoft's lawyers tried using your argument to get partial summary judgement in Caldera v. Microsoft. They lost, and they lost the appeal. Here's Caldera's claim, quoting the summary in the US District Court judgement:
> In addition to its improper vaporware and FUD campaigns, Caldera alleges that Microsoft also forced OEMs away from DR DOS 5.0 by what plaintiff refers to as the "licensing triple-whammy," which refers to (1) per processor licenses, (2) minimum commitments subject to forfeiture, and (3) increased license duration. Per processor licensing agreements required an OEM to pay Microsoft a royalty on every machine the OEM shipped regardless whether the machine contained MS-DOS or a different operating system. This is in contrast to a per system licensing agreement, which required OEMs to pay a royalty on only those computers shipped with MS-DOS installed. The use of per processor agreements is argued by plaintiff to be Microsoft's most effective single weapon against DR DOS. Plaintiff alleges that DRI had no realistic chance to license DR DOS to OEMs under a per processor license with Microsoft. It would make no sense for an OEM to install DR DOS when it had already paid for MS-DOS on every machine. Microsoft contends that OEMs were free to depart from the per processor licensing scheme, and that price differentials between license types were "relatively minor." However, plaintiff points to the depositions of several OEM executives who testified that even slight price differentials between the per processor and per system licenses meant that only the per processor license was financially viable.
This case was specifically about illegal use of monopoly power, which is why you can read:
> By 1988 Microsoft had obtained a monopoly position in the DOS market. For purposes of the present motions, Microsoft does not dispute the contention that it has such a monopoly in the operating systems market.
Without that assumption they could not have gotten summary judgement.
Isn't that the whole point? They forced the OEMs to drop other OSs by abusing their monopoly position. If this is not dirty I don't know what is. But yes, MS has plenty of other dirty moves in their past. I don't trust them one bit, even with their new clothes on.
I was reading a book on Microsoft's history and they did that back in the DOS days: any IBM PC clone that was sold had to pay for the MS-DOS license regardless of if the PC would be running MS-DOS or not. So unless someone explicitly asked for DR-DOS (and was fine to pay for both the MS-DOS and the DR-DOS license since the former would need to be paid anyway), manufacturers just used MS-DOS because it was "cheaper" (and with MS-DOS being the "standard" it isn't like they could afford to not license it).
The book was written in 1993 btw.
Edit: Especially since some of these purchasers are not technically-minded Linux users, who can handle a blank disk error, but people who want to use their (ahem) specially-aquired Windows licenses.
My current home computer is an HP EliteBook I custom ordered with FreeDOS to install Linux on. (Also got the matte touchscreen!)
Some OEMs don't sell laptops with DOS, but instead have a procedure where you can "return" the Windows license that came with it and get a refund.
Otherwise, Microsoft’s terms are basically anything that isn’t an ATM machine, server or IoT needs a windows license. In enterprise agreements, you need to buy Windows licenses for MacOS devices too.
Why would you tell Microsoft that you've bought some Macs? It's not like they're the IRS, they're just a company. They have no business to know any of this.
Also, you need CALs to use Windows server based services like AD and file servers (unless you’re using a NAS)
Yes, that's exactly how it works.
Windows Server Client Access Licenses (CALs) are sold either by user or by device. User licenses allow one person to use any Windows Server hosted services in the organization from any device. Device licenses allow any number of people to use any Windows Server hosted services from one specific device.
If you have a bunch of users with their own personal computers and potentially other devices like a normal office the user CAL model usually makes the most sense, but for environments like classrooms or multi-shift businesses where you have significantly more devices than users the device CAL model can sometimes be beneficial. The catch is that almost any use of Windows services requires a CAL and that includes DHCP/DNS. If you host either of those services primarily from Windows the device count suddenly changes significantly.
On dos you own the machine down to bare metal for better or worse, usually worse, but software only slows things down.
I suspect if you stuck a protocol analyzer on it you'll find one of three situations:
Someone did simplistic polling instead of a windowing protocol so increased latency makes the overall system unusably slow. 0.1 ms vs 10 ms per handshake is not noticeable to humans but if your scada sequentially polls 10000 parameters thats the difference between a poll taking 1 second or about two minutes...
The other scenario is keep alive signaling where the computer needs to assure the CNC machine that its still alive and sane every 10 ms or the controller initiates an emergency shutdown. Can't have a giant lathe or printing press running off wild not under active computer control. So windows wants to multitask and do who knows what for 50 ms, and the scada shuts down.
The final situation is they're doing something "weird" at the hardware level like signaling over the control pins instead of over the serial ports. Like toggling the RS-232 DSR pin turns on the milling machine motor for 10 ms instead of sending a serial RX/TX power command every 10 ms. Windows opinion of DSR, IIRC, is DSR means the serial port driver registered in windows and is not available to end users. Been a long time since I've had to deal with that so I might misremember.
This sort of thing was just normal. No multitasking so you had full control of the hardware. Third party libraries or custom code for serial, sound, graphics, often keyboard. Drop into assembly for extra speed. DOS was basically a library for filesystem access, process creation and limited memory management!
I still have 1.193180Mhz burned in my brain...
I sometimes think if we will one day cycle back to that model. It was at least an era where I thought I had some understand of computer. Now I seriously dont. But it works.
(I can certainly imagine virtual 8086 mode / emm386-style shenanigans, varying with configuration and what's loaded in your config.sys, but this is all very hypothetical, and the most straightforwardly hypothetical position of all is that one bare-bones 16-bit DOS should be exactly the same as another in this regard, not necessarily being in the loop at all.)
Unfortunately, I did not have the time to investigate the problem further. It was the one aspect of being a helpdesk monkey I seriously disliked.
I was just sad that FreeDOS did not work, but installing MS-DOS from floppy disks was fair compensation. 3.5" Floppy disks! We had an USB floppy drive lying around, but actually finding 3 floppy disks was quite the challenge. (-:
Such laws existed and may still exist, I remember Germany had some tax on CD-RW disc sales because "they were used also for piracy". All it took was "lobby" at the right level of government.
Anyway, the Digital Mars C/C++ compiler looks impressive.
[1]: https://github.com/open-watcom/open-watcom-v2/commit/ac10ed3...
(FWIW: I'm in agreement with you that DMC++ is likely superior, I'm more curious about what OpenWatcom's deficiencies in relation to it are, and I reckon there are probably only a few people as familiar and qualified than yourself to comment)
DMC version: Elapsed time = 7.593 seconds
OW2 version: Elapsed time = 6.344 seconds
While i'm using a different CPU than the one from the previous benchmark, the relative results are practically identical (OW version is ~1.195 times faster for the old results and ~1.196 with the new results). VC6 is still faster than both.
FWIW i do not think these different matter that much in practice anyway, if anyone is going to target those old machines nowadays it'd be for retrocoding fun and in those cases if performance is a concern you'd most likely just want to use assembly anyway. IMO as long as a compiler does some basic optimizations to get mostly there it is fine. Some years ago i wrote a small maze rasterizer[0] in C to run on an original IBM PC and i tried to compile it with both Turbo C and OpenWatcom... and there was zero difference in performance since the main render loop was done by generated machine code, so OW's optimizer was optimizing stuff that didn't really need optimizing anyway :-P.
Thanks for running the tests.
I can email you a current version if you like.
Well, Doom was written in C, so...
Quake also used assembly for a few bits (also, like Doom, had C versions for portability).
That is what i meant when i wrote "use assembly", not to write the entire game in assembly (which is why i also gave my maze renderer as an example - pretty much all of it was in C except a tiny part).
[0] https://github.com/id-Software/DOOM/blob/master/linuxdoom-1....
https://github.com/open-watcom/open-watcom-v2/blob/master/li...
It could be made to run on Linux without Wine, there's nothing in particular nailing it to Windows.
Sounds like DMC++ would need porting to run on Linux though.
Also none of those are "not free enough" (FSF claims so but it doesn't seem to explain why) and they're really about the license itself, not how it applies in practice to OpenWatcom.
[0] https://opensource.org/licenses/Watcom-1.0
[1] https://www.gnu.org/licenses/license-list.html#Watcom
[2] https://lists.debian.org/debian-legal/2006/07/msg00014.html
Sagan said..."extraordinary claims require extraordinary evidence".
I don't think he is the boasting type, even though he has enough reasons to boast… being the only person that ever wrote a C++ compiler by himself and all.
The reason is pretty simple - all the support code would exceed 640K. You wouldn't get past a demo program.
Templates work, but you have to be pretty cautious in avoiding template bloat. Probably better off just avoiding them.
I have a kit-built machine with an 8MHz 8088-class CPU, and FreeDOS is much slower to boot than PC DOS 2000 (the final mainstream MS/PC DOS release). When I used it years ago on 486-class machines (distraction0-free laptops) the gap didn't seem so wide.
Pity DR-DOS seems to have disappeared into the ether. It was a competent choice to, and I know there was a point where you could get a source distribution for embedded purposes, so you'd expect that the next logical step would have been crowdfunding a source buyout.
My main wish for it would be serial console support. I have "old" industrial boards (386EX, 512K of non-expandable RAM, 8-bit bus, but made in '02). It has a BIOS and an in-ROM variant of DOS by a company called General Software. It has no built-in video hardware and uses a serial console by default.
FreeDOS doesn't work if you put:
ctty com1
in your autoexec.bat?Seems to be supported: http://wiki.freedos.org/wiki/index.php/Ctty
Perhaps you need to modify the installer disk with that option, or install FreeDOS to disk on another system first?
The FreeDOS kernel messages came out at boot (over serial), but when it got to command.com, it just started printing '.' characters to my serial console. To be fair, I really didn't spend much time debugging.
Microsoft has open-sourced them:
Just for the sake of perspective:
15 years later, you had NT 3.51 running on pentiums with NT 4.0 coming just around the corner and Windows 95 had already been out for a year.
20 years later Windows XP was released and MS held an event celebrating the end of MS-DOS
Even ten years later, you had Windows 3.1 running on 486s and OS/2 2.0 was a year away from release.
So the 8088 and assembly window was really, really small. And people were over dos by the time Windows 3.0 was released (1990 -nine years after the first IBM PC)
It did take a while for the PC revolution to really pick up speed. The 1981 genesis involved a floppy only machine. The 1983 PC-XT was the practical workhorse that changed everything. The 1984 PC-AT was insanely expensive originally and the average knowledge worker could well have skipped straight to a 386 machine in the late 80s at which point the dramatic speed increases year on year became the norm for a while. Many people continued using MS-DOS alone into the 90s, I know I did. Windows prior to V3.1 was impractical and nobody used it. Windows 3.1 was a successful product and a good experience if you had a really powerful machine. Windows 95 in, that's right 1995, was the real beginning of the end of MS-DOS alone as a mass market office workers' operating system. I would put the golden years of MS-DOS software targeted primarily at 8088 8/16 bit CPUs (in some ways the 8088 had 8 bit hardware and the comparitively uncommon 8086 was the real 16 bit CPU) as 1983-1988. By 1988 much more powerful 32 bit machines were affordable and becoming ubiquitous, but for a while they were mainly used to run 16 bit software much faster.
By 1994 when FreeDOS got underway, 8088 machines were not worth targeting and I'm not surprised FreeDOS doesn't work as well as MS-DOS on them, as I already stated.
It really wasn't. Ten years later you could walk into a shop and still purchase an XT-class system. It ran WordPerfect (written in asm) just fine. Newer stuff had come out, but it was always more expensive. It wasn't until Windows 3.1 took off circa 1992ish that PC hardware started getting faster and cheaper very rapidly.
> And people were over dos by the time Windows 3.0 was released
As a practical matter, Windows 3.x required a lot of DOS configuration. It really wasn't until Windows 95 you could mostly ignore it.
Would you mind sharing details? I am curious. Is this a modern kit made from mostly new parts that is available to purchase?
Google/DDG some FreeDOS distros for 8086, which are many times slimmer than the former FreeDOS.
Have fun.
Which could actually have been possible at one point, for the low price of $25,000: http://web.archive.org/web/20101011141137/http://www.drdos.c...
FSVO "mainstream". IBM released PC DOS 7.1 (with full FAT32 and LBA support) as a free download as part of its Server Guide Scripting Toolkit.
It can readily be combined with the rest of PC DOS 2000 to yield a complete OS, comparable to "MS-DOS 7.1" extracted from Win98SE.
I have described how to do this on my blog:
https://liam-on-linux.livejournal.com/59703.html
> Pity DR-DOS seems to have disappeared into the ether.
It is still around, but Udo Kuhnt has, sadly, given up the Enhanced DR OpenDOS project.
The boot floppies on archiveos.org are defective. I have fixed them, and posted disk images of them on my blog, too.
https://liam-on-linux.livejournal.com/58013.html
> It was a competent choice to, and I know there was a point where you could get a
> source distribution for embedded purposes, so you'd expect that the next logical step
> would have been crowdfunding a source buyout.
Strongly agreed. :-/
Mine didn't have a box, just the bundle wrapped, so I wonder if the use case was similar to how some OEMs ship FreeDOS for the "it has an OS for contractual reasons" purpose. You don't need a box if it's being slipped in the system packaging.
As a counter-example:
DR-DOS from Caldera or Lineo made it to v7.03, I think.
Versions 7.04 through to 7.07 were finished, released and sold, but only as OEM products, bundled on bootable floppies containing Ontrack and Seagate hard disk toolkits, in Nero Burning ROM's bootable floppies and so on. (I suspect also in virus scanners, disk-imaging products, backup tools, etc.) Just the boot file(s) and COMMAND.COM.
Given that a bootable diskette containing a disk manager was included with probably hundreds of thousands to millions of EIDE hard disks at the end of the 1990s... it's quite possible that more copies were ever shipped that way than were sold as standalone retail products.
(Arguably, but IMHO: sad to say.)
So by any reasonable definition, the "mainstream" version of DR-DOS might be the one bundled on maybe millions of bootable diskettes, and not the boxed product.
I have no idea how many copied of PC DOS 7.1 IBM has distributed this way, and I bet it hasn't either.
But I take your point, and I accept it. I just have a slightly different definition myself. :-)
So this is pretty annoying. But as far as I can tell, FreeDOS does too much, it creates a dos environment in a separate window. What I'd like is:
dosbox app arguments...
where dosbox emulates DOS just enough to run console apps. This would enable me to test the compiler conventionally.So, what's needed is an 8086 emulator and a minimal DOS emulator. Is there a way to use FreeDOS like that?
Have you heard of or tried "MS-DOS Player"? It seems to convert binaries into a format that Windows can understand. I think you have to do it on a per-file basis so it might be more of a headache than it's worth; but it's out there!
http://takeda-toshiya.my.coocan.jp/msdos/index.html (original site)
https://virtuallyfun.com/wordpress/2011/02/11/ms-dos-player-...
[edit]There's also winevdm which can run 16 bit windows binaries on 64 bit windows. It has DOS support but it's incomplete and it points back to MS-DOS player in it's readme...
I wonder how long it would take to write an 8086 emulator and just intercept the file I/O DOS calls. Would anyone else be interested in such a program?
C:\Users\andrew\emu2>bash -c "ndisasm x.com"
00000000 B8214C mov ax,0x4c21
00000003 CD21 int 0x21
C:\Users\andrew\emu2>bash -c "./emu2 ./x.com"
C:\Users\andrew\emu2>echo %ERRORLEVEL%
33Bullet points, quoted from the above page:
• New FreeCOM 0.85a
• New Kernel 2043 and an 8086 version with FAT32 support
• Floppy Edition now uses compression and requires about half as many diskettes
• The return of networking
• Some new programs and games
• Many many many package updates
• Some updates and improvements to NLS
• Improved install process, especially with the MBR
• Some support to automatically set the COUNTRY.SYS information
• Improved CD initialization for the boot media and installed system
• … and much, much more!
FreeDOS's main problem is that DOSBox can run almost everything in a modern OS backdrop. DOSBox CAN run windows 3.1 as well, and I believe Windows 95. And you can drop out of it to a modern networked OS whenever you need to. Sure it's less efficient, but there's now 100x (maybe 1000x) more power in the CPU.
For FreeDOS to really achieve its goals it likely needs several things:
1) works in a VM (which it appears to do)
2) runs almost all DOS software in a VM, this involves drivers that would enable long term VM compatibility. Do VMs have a "general networking driver" and "general video driver".
3) provide utilities for networking
4) ... this is the hard one:
FreeDOS would need to curate, collect, and provide collections of old DOS software with modern-friendly installers. The challenge here is legality and copyright.
Collections of WordPerfect / etc
Collections of the compilers / interpreters (Turbo Pascal, Turbo C++)
There are ongoing significant work in preserving Games with eXoDOS, but it's noteworthy that eXoDOS and eXoWIN (the 3.X windows preservation project) don't seem to use freedos at all.
As stated, DOSBox handles most DOS software. But one of the biggest emulation/preservation blind spots right now is the Windows 3.1 --> Windows 98 non-NT kernel software that was semi-DOS and semi-not. The programs could run roughshod on the memory space and APIs, but bridged to the gigahertz era of x86 CPUs. And x86 CPUs are a bear to emulate between all the modes and ISA extensions over the years.
For network, you probably want VirtIO. For video, just VESA? Although honestly I don't know that that's needed; VMs can just provide emulated devices for which drivers already exist.
3) is already part of the FreeDOS installer.
4) Is best left to some other project(s) both from a scope perspective as well as the legal perspective you mention. Particularly for modernizing the installers. DOS software collections are quite easy to come by, particularly with organizations like Internet Archive.
For number 2, "it depends"; qemu, vmware, etc all have different features. An alternative is to use something like 86Box (https://github.com/86Box/86Box/) which can present the OS with a complete DOS-era computer with video and other peripherals.
For number 3; I think there's a networking set in the freedos distribution. I have no idea how robust it is, though.
Number four -why? Unless I'm very wrong, the aim of freedos isn't to preserve the dos software landscape but to ensure that there's an ms-dos compatible operating system out there if people want to use it. Also, winworldpc has a fair amount of dos software as does archive.org as I remember.
>As stated, DOSBox handles most DOS software. But one of the biggest emulation/preservation blind spots right now is the Windows 3.1 --> Windows 98 non-NT kernel software that was semi-DOS and semi-not.
The software is largely still out there, and 86box covers the emulation. The real blind spot is the early 00's hole where computers were too complex to emulate well but things are just slightly incompatible with modern operating systems.
IMO it's a matter of perspective. I'd say FreeDOS is already a success as a modern, maintained DOS implementation. The fact that most users find DOSBox and its forks more useful doesn't diminish FD. More software isn't a problem.
However, the problem with developing games/mods for an emulator such as DOSBox, is you may find they run fine in the emulator but don't work in real DOS. Some years ago, I had MS-DOS 6.22 running under VirtualBox and our son was using that to play DOS games. He wanted to play this Command Keen mod he saw on YouTube, but it kept on crashing with an "out of memory" error. Eventually we tried it on DOSBox instead, there it worked. I tried to free up memory by tinkering with CONFIG.SYS/etc, but it appears to be impossible to get that much free conventional memory with real MS-DOS, even when making fullest possible use of UMBs and the HMA. I never tried FreeDOS, but it might have the same issue.
But it does run in FreeDOS, in fact there is a video Jim Hall (the author of the article and the FreeDOS maintainer) made where he plays a bit of the game[1]. Note that since that version both performance and some bugs have been improved/fixed (also i'm working on a new update that improves the performance even further (i've actually made a full playthrough on a 133MHz P1 laptop i have here).
The development itself was done on Windows though and i recently ported the editor to Linux[2].
I haven't done anything else since then but the engine was written to be separate from the game and i want to separate it from the source too at some point. I did consider making a game for the dungeon crawler jam last year but i wasn't very motivated as 7 days felt too little for making something interesting (IMO) and only made a small prototype for walking around [3] (that was done before the jam to ensure the engine was usable for making a game like that, but i lost interest before the jam even began :-P). Also it wasn't specifically for DOS or retro machines in general, i just thought of reusing the engine since i had it lying around and was usable enough.
[0] https://bad-sector.itch.io/post-apocalyptic-petra
[1] https://www.youtube.com/watch?v=JGxn0Bl9U4A
FreeDOS is able to run Microsoft Windows 1.0 and 2.0 releases. Windows 3.x releases, which had support for i386 processors, cannot fully be run in 386 Enhanced Mode
I wonder why that is. Well, too bad! Windows 3.11 was a fine, usable OS.
But a clever hacker just just patched it a few months ago. So now it works, kinda: https://sourceforge.net/p/freedos/mailman/message/37326256/
There are I believe issues with the memory manager and there is a sort of protection mechanism that actually prevents running Windows 3.1/3.11 also on newer MS DOS (aka the DOS 7.1/8.0 of Windows 98/Me, whilst the 7.0 from Windows95 should be able to run without patches), there are dedicated patches/programs for some of these (original MS) DOS versions, probably something similar is needed for freedos.
EDIT: for some reasons this post ended up after retrac's one that actually provides a solution
That said, work's happened to make FreeDOS boot windows 3 at least under special circumstances (I'm not sure if this kernel made it into the current FreeDOS or not): https://virtuallyfun.com/wordpress/2021/07/27/freedos-runnin...
[1] https://store.steampowered.com/app/32400/STAR_WARS__Dark_For...
I know archive.org has running classic games in the browser, but I wonder how many will run under FreeDoS.
The framework IA uses for embedding emulators: https://github.com/db48x/emularity
Emscripten DOSBox: https://github.com/dreamlayers/em-dosbox/
Though with a quick glance at current local computer retailer catalogs I found only HP 290 G3, which is not a laptop (https://www8.hp.com/h20195/v2/GetPDF.aspx/c06636833.pdf). Found plenty of discontinued laptops (e.g. HP ProBook 430 G6: https://support.hp.com/lv-en/document/c06179691), though, so maybe it is just not as common anymore. I vaguely remember seeing FreeDOS laptops much more often 5-10 years ago.
DR-DOS was bought by Novell when Digital Research went under and became Novell DOS, then it was sold again to Caldera (and later its spun-off Lineo division) where it was called Caldera OpenDOS for a while. It was sold off one last time to DRDOS, Inc. which sold it as a commercial product until at least 2011. I think the current status of the ownership and codebase is unclear.