JdBP>> If you are targetting a non-protected mode operating system,
JdBP>> like DOS, then let your DOS extender worry about loading the
JdBP>> EXE. It will stick a stub program on the front of your
JdBP>> executable (TLINK can generate NE format executables, if memory
JdBP>> serves) which will deal with loading your program into memory
JdBP>> and switching into protected mode. If you aren't using a DOS
JdBP>> extender, then you have more worries than can be dealt with in
JdBP>> even a month of echomail messages.
RH> I don't use any kind of extender, [...]
Then you are making work for yourself unnecessarily. Unless you are writing
a PC-based embedded system -- and you've stated that your program will run
from DOS, so you obviously aren't --, buy and use a DOS extender and forget
about rolling your own code to switch to protected mode, load executables
from file, and handle DOS API calls. The DOS extender will do all of that,
and all that you need concentrate on is creating a 16-bit protected mode
program and linking it into NE format using TLINK. If DOS/16M from Rational
Systems is still around, it should, I gather, work with Borland C++ 3.1 for
DOS, since it understands the NE format executables that TLINK from BC++DOS
3.1 will generate.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|