9 ms·
Is there really a difference between writing a DOS program and writing a FreeDOS program? You just need a period-accurate compiler that can target DOS. Maybe
by Dwedit 1y ago
Is there really a difference between writing a DOS program and writing a FreeDOS program? You just need a period-accurate compiler that can target DOS. Maybe OpenWatcom, maybe DJGPP.
With HXDOS, you can also write a Win32 console-mode program and run it on DOS. 7-zip is an example of a program compatible with HXDOS.
- johannes1234321 1y agoThe "difference" is, that this is the FreeDOS project, thus they focus on that environment.
- QuercusMax 1y agoI confess I don't know anything about FreeDOS, but are they trying to evolve DOS for the future, or just make a free bug-for-bug compatible version? Those are very different things.
- johannes1234321 1y agoI think the goal is compatibility, but not being afraid of extensions (like power management support and some other "modern" hardware features) In the context of this tutorial: They use their own "fed" editor.
- lproven 1y agoNeither. Because they are not aiming for: > a free bug-for-bug compatible version FreeDOS is significantly different from "real" MS-DOS. Back in the 20th century I used DR-DOS, written by Digital Research, the company behind the original OS of which DOS was an unauthorised re-implementation. (DR CP/M-86 was years late, so SCP wrote 86-DOS as a replacement. MS licensed 86-DOS and later bought it. It's not a clone: CP/M was in a compiled high-level language, while 86-DOS was implemented in assembly language, implementing a version of the same API on a different CPU ISA, using a different filesystem drawn from a separate pre-existing product.) Until MS discontinued MS-DOS and IBM kept on developing it for a few more versions, IBM PC DOS and MS-DOS were near identical. DR-DOS was a little different from MS-DOS. It had extra commands, used different syntax in the config files, very slightly different output and things -- but then, it was from the original vendor, so that was excusable, and mostly, it understood MS syntax as well. FreeDOS is not like that. It's quite unlike any other version of DOS. It has differently-named config files, it lives in a differently-named folder with an internal structure, and it has a number of external commands with different names and different syntax. For example, one that threw me is that there is no `SUBST` command, but a different `SWSUBST` which combines the functionality of SUBST and JOIN. In 21st century DOS terms, at best, FreeDOS is as different from MS/PC/DR DOS as Red Hat is from Debian. In fact it may be more like it to say FreeDOS vs OG DOS is akin to FreeBSD vs Linux.
- WalterBright 1y agoThe Digital Mars compiler for DOS is available for free. https://www.digitalmars.com/ https://www.digitalmars.com/
- kragen 1y agoBut the GCC, OpenWatcom, and DJGPP compilers the FreeDOS folks recommend are additionally free software, which is of real value to some of us. Zortech C had a reputation for producing better code IIRC, and it could run on an 80286, which I'm not sure the others can?
- 1313ed01 1y agoI guess it made a lot of sense to implement compilers in 32-bit protected mode to get more space to work with easier? Free Pascal's compiler also requires 32-bit even if it can generate 16-bit DOS code as well (at least when cross-compiling from some other OS; I have not tried to cross-compile from DOS 32-bit compiler to DOS 16-bit executable). Some people (and by that I mean Debian people; not sure about anyone else) disagree about OpenWatcom being free software. The license has some unusual requirement(s). There has been talk for a long time about possibly fixing that, but I do not know how on track that is (or how much it matters, in practice): https://github.com/open-watcom/open-watcom-v2/discussions/271 https://github.com/open-watcom/open-watcom-v2/discussions/27...
- WalterBright 1y agoI developed on a 32 bit machine because of memory protection. Memory corruption resulted in seg faults, while in 16 bit real mode memory corruption would scramble your hard disk. I ran all the test suites on protected machines. Only when everything was perfect did I run the programs in real mode DOS. Protected mode memory is the greatest advance ever in computer hardware.
- kragen 1y agoI wonder if it's obsolete now that we have things like Wasm. I mean, in some sense, it's nothing new—the UCSD p-System, EUMEL, and Dijkstra's THE offered the same safety much earlier, just at a punishing performance cost. Also, though, you could imagine a system that protected the hard disk from corruption without having to be involved every time the CPU accessed RAM. For example, you could warm-boot into a trusted executive every time you wanted to flush the I/O queue to the hard disk. Rebooting would reload the executive code from the disk and set a "supervisor" bit on the disk interface, which the trusted executive would clear before yielding control back to the untrusted user program.
- pjmlp 1y agoNot really, I was expecteding the tutorial to somehow dig out Turbo C, or Quick C.