On Tuesday, June 20, 2023 at 8:14:39 AM UTC+8,
[email protected] wrote:
If it detects (any idea how that is done?) that the environment is
MSDOS instead of OS2 it simply hardcodes a shift value?
I found this:
http://www.edm2.com/index.php/DosGetMachineMode
But it still doesn't answer my question.
But I think I've figured out the answer.
There will be an "NE" (instead of "PE") marking in the
executable. When running under OS/2 1.0 it will go
straight to the NE code and run it appropriately, and
it knows at that point that it is OS/2. And the bindings
to the above 2 functions will be done against a DLL.
But if it is running under MSDOS, it will execute the MZ
part of the code, and at that point it knows that it is
MSDOS, and then it will "manually" bind all the NE
calls to its own MZ code, and then execute the NE
code. And the MZ portion of the code may or may
not do an INT 21H call, depending on what the function is.
BFN. Paul.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)