Mail Archives: djgpp/2000/10/08/21:40:08
| From: jt williams <jeffw AT darwin DOT sfbr DOT org>
| Date: Sun, 8 Oct 2000 11:17:02 -0600
|
| Strange question: When is a DOS app a "32-bit" app? Or does "32-bit DOS"
| have meaning only with respect to the kernel and protected mode?
|
| Suppose a certain application program 'foo.c' is written to compile using
| 16-bit tools (e.g., Borland). And suppose that by using '#ifdef __DJGPP__'
| statements and DOS-specific DJGPP functions (e.g., _get_dos_version(), etc),
| the code is also made to compile with DJGPP and to generate an executable that
| works (with cwsdpmi).
|
| Is 'foo.exe' now a 32-bit DOS app? If not, why? Do these questions have any
| meaning?
Several others have answered, but here's what I have to say...
A 32-bit app. is one that runs as a 32-bit prot. mode app, i.e. it has
a code segment selector in which the segment descriptor has the "G"
bit set to 1 (http://www.midpec.com/djgpp/protmode/). 16-bit programs,
OTOH, are of two types - real and protected.
386 instructions behave entirely different in 32-bit mode and
16-bit mode. For example, if the opcode for MOV AX, BX was "xx yy" in
16-bit mode, the same opcode "xx yy" would perform the operation "MOV
EAX, EBX" in 32-bit protected mode. This isn't the only
difference. Stack alignment is different....
In the case you mentioned, the DJGPP app, is a mixture of real 16-bit,
protected mode 16-bit and 32-bit, although it is mostly 32-bit. True
32-bit apps are the ones you run on Unix systems.
This is just a short answer, though ;-)
--
Prashant TR <tr AT midpec DOT com>
Web: http://www.midpec.com/
- Raw text -