Hello!
Another problem occured:
I am going to write a 16-bit protected mode program with Borland C++ *3.1*.
All I need from you is to know how to load an EXE program into the
memory (protected mode!).
I can imagine there are several steps?:
1) Open EXE file.
2) Read and process EXE header information.
3) Allocate memory for EXE segments.
4) Load each EXE segment to its memory segment. Each segment gets a
selector and a descriptor.
5) Jump to entry point.
1, 2, 3, 5 work fine. But how do I know where a segment starts and where
it ends (in the file!).
I must need what's the starting offset of seg1, seg2...
Please help, please excuse my bad English...
Richard
... It is a rather pleasant experience to be alone in a bank at night.
--- Blue Wave v2.05 [NR]
---------------
* Origin: Constants aren't (2:310/3)
|