Remix.run Logo
kragen 4 days ago

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?

WalterBright 4 days ago | parent | next [-]

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!

zozbot234 4 days ago | parent | next [-]

Historically there were 24-bit ("16 megs") DOS extenders that would work on a 286, though the 286's inability to seamlessly go back to real mode (which is needed for compatibility with BIOS routines) creates issues that make 286 protected mode a bit of a theoretical curiosity.

WalterBright 4 days ago | parent [-]

I used the 286 in protected mode for developing the compiler, until the 386 became available.

They were really worth it.

OS/2 ran on the 286 in protected mode. Rational Systems had a 286 protected mode system that we shipped with Zortech. Pharlap had one, too.

kragen 4 days ago | parent | prev [-]

That was a very intelligent answer.

I was trying to come up with some advantage of Zortech C that might justify using it now instead of an open-source compiler like DJGPP under some circumstance. Any ideas?

WalterBright 4 days ago | parent [-]

https://github.com/DigitalMars/Compiler

kragen 4 days ago | parent [-]

Oh, the answer is that Zortech C is actually open-source, and I was just being an idiot? That's wonderful! And the license here doesn't seem to have any of the questionable bits in the OpenWatcom license.

WalterBright 4 days ago | parent [-]

I wasn't able to make it fully open source until a few years ago.

kragen 4 days ago | parent [-]

And maybe people just haven't noticed? I assumed when you said "free of charge" that you implicitly meant "but not open source", and also didn't see anything on https://www.digitalmars.com/download/freecompiler.html about compiler source, and the only "license" link on that page goes to https://www.digitalmars.com/download/dmcpp.html which says, "The Software is copyrighted and comes with a single user license, and may not be redistributed. If you wish to obtain a redistribution license,...", so maybe you could see how I got the wrong idea!

WalterBright 3 days ago | parent [-]

Yeah I need to fix that. Thanks for poking at it.

kragen a day ago | parent [-]

I'm glad my comment was useful! I was worried it might annoy you.

1313ed01 4 days ago | parent | prev | next [-]

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

WalterBright 4 days ago | parent | next [-]

I 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 a day ago | parent [-]

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

kragen 4 days ago | parent | prev [-]

Thanks for the pointer: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376431

It seems a bit questionable but not an open-and-shut not-open-source license.

Narishma 4 days ago | parent | prev [-]

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.