VOGONS

Common searches


First post, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

with compilers supporting protected mode, one can simply use large amounts of ram in the program without any effort, leaving everything to the dos extender to handle, and the program can even work without anything in config.sys. which compilers other than the infamous watcom and djgpp would do this?
and before dos extenders became available, real mode programs can make access to extended memory through xms interface like himem.sys, although only for data storage and leaving all conventional ram for code. but what does one have to do to access xms? and does it need compiler support?
also, does floatpoint operations(accessing fpu rather than cpu interrupt) need any compiler support? when did that come up?

Reply 1 of 5, by root42

User metadata
Rank l33t
Rank
l33t

XMS is a specification by Microsoft (and others), see http://www.phatcode.net/res/219/files/xms30.txt.
It is triggered via software interrupt 2fh. So it can be used by any compiler and language in DOS.
FPU support has to be in the language/compiler. But that used to be the case from very early on. I remember that even very early Turbo Pascal versions had FPU support. Also At least Turbo C 2.0 also had FPU support.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 2 of 5, by realnc

User metadata
Rank Oldbie
Rank
Oldbie

There's also "unreal mode" with 286 and higher. It was undocumented. In that mode, the code is real mode code, but it has access to all memory (32-bit addressing.)

I think only applications used that. The only game I can find that used this mode was Ultima VII.

Reply 3 of 5, by root42

User metadata
Rank l33t
Rank
l33t
realnc wrote:

There's also "unreal mode" with 286 and higher. It was undocumented. In that mode, the code is real mode code, but it has access to all memory (32-bit addressing.)

I think only applications used that. The only game I can find that used this mode was Ultima VII.

Problem with that mode is, iirc, that it is incompatible with emm386, since it puts the CPU in protected mode. And since the vast majority of games would use protected mode/emm386, it was inconvenient to have to reboot just for one particular game.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 4 of 5, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie
noshutdown wrote:

with compilers supporting protected mode, one can simply use large amounts of ram in the program without any effort, leaving everything to the dos extender to handle, and the program can even work without anything in config.sys. which compilers other than the infamous watcom and djgpp would do this?

Why would you call Watcom or DJGPP "infamous"?

Borland Pascal (not Turbo Pascal, which was a stripped-down version of BP) supports 286-like protected mode. It's 16-bit only, so you get (AFAIK) 16 MB of RAM but it's still in 64 kB chunks (segments) like in real mode.
I don't know if and how Borland C++ supported that mode, but I think it did too.

Free Pascal supports 32-bit protected mode using the same DOS extender as DJGPP.

DJGPP also includes GNAT (an Ada compiler) so it's not C/C++ only.

Reply 5 of 5, by realnc

User metadata
Rank Oldbie
Rank
Oldbie

Btw, if you're looking for the most modern DOS compiler, note that DJGPP, even though it doesn't mention it on their website, actually supports the latest GCC versions. That means you get support for C11, C14, C++17, and all that jazz. You need to do some manual work to set it up, but once you do, you have a modern, year 2018 compiler that can target 32-bit DOS.