Comment by Dwedit

6 days 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.

The "difference" is, that this is the FreeDOS project, thus they focus on that environment.

  • I 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.

    • Neither. 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.

    • I 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.

The Digital Mars compiler for DOS is available for free.

https://www.digitalmars.com/

  • But 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?

    • I don't remember when we transitioned to 32 bit DOS extenders for the DOS compilers, but we never got any pushback for that. Developers all used 386 computers.

      I remember attending a compile panel at one of the SDWest conferences. The panel members were myself, representing Zortech, along with representatives from Borland, Watcom, and Microsoft.

      The first question was "do you sell a version that will work on a floppy disk only computer?" One of the other panelists responded with yes, we do. He went on to describe how the various bits could be distributed among multiple floppies, and of course it involved a lot of shuffling floppies in and out.

      I was next. I replied, "Yes, we have a version that does it! It costs $200 extra and comes with a hard disk drive!"

      That got a huge laugh, and that was the end of that question. I never heard it again from anybody. Sometimes, it's just time to move on!

      9 replies →

    • I 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/27...

      3 replies →

    • I don't know about OpenWatcom but I used the original Watcom on my old 286 just fine. Even the Windows 3.1 IDE ran fine on it IIRC.

Not really, I was expecteding the tutorial to somehow dig out Turbo C, or Quick C.