230 points · by ingve · 4y ago · 145 comments
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.
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 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. (-:
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!)
Microsoft and Bill Gates built their position on pure evil.
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.
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.
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.
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 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.
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.
Microsoft has open-sourced them:
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. :-)
Would you mind sharing details? I am curious. Is this a modern kit made from mostly new parts that is available to purchase?
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...
Google/DDG some FreeDOS distros for 8086, which are many times slimmer than the former FreeDOS.
Have fun.
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.
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.
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.
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/
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...
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
[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.