Program startup registers are defined as follows.
EIP = Starting program entry address.
ESP = Top of stack address.
CS = Code selector for base of linear address space.
DS = ES = SS = Data selector for base of linear address space.
FS = Data selector of base of Thread Information Block (TIB).
GS = 0.
EAX = EBX = 0.
ECX = EDX = 0.
ESI = EDI = 0.
EBP = 0.
- ESP+0] = Return address to routine which calls DosExit(1,EAX).
- ESP+4] = Module handle for program module.
- ESP+8] = Reserved.
- ESP+12] = Environment data object address.
- ESP+16] = Command line linear address in environment data object.
Library initialization registers are defined as follows.
EIP = Library entry address.
ESP = User program stack.
CS = Code selector for base of linear address space.
DS = ES = SS = Data selector for base of linear address space.
FS = Data selector of base of Thread Information Block (TIB).
GS = 0.
EAX = EBX = 0.
ECX = EDX = 0.
ESI = EDI = 0.
EBP = 0.
- ESP+0] = Return address to system, (EAX) = return code.
- ESP+4] = Module handle for library module.
- ESP+8] = 0 (Initialization) Note that a 32-bit library
may specify that its entry address is in a 16-bit code object. In this
case, the entry registers are the same as for entry to a library using the
Segmented EXE format. These are documented elsewhere. This means that a
16-bit library may be relinked to take advantage of the benefits of the
Linear EXE format (notably, efficient paging).
Library termination registers are defined as follows.
EIP = Library entry address.
ESP = User program stack.
CS = Code selector for base of linear address space.
DS = ES = SS = Data selector for base of linear address space.
FS = Data selector of base of Thread Information Block (TIB).
GS = 0.
EAX = EBX = 0.
ECX = EDX = 0.
ESI = EDI = 0.
EBP = 0.
- ESP+0] = Return address to system.
- ESP+4] = Module handle for library module.
- ESP+8] = 1 (Termination) Note that Library termination
is not allowed for libraries with 16-bit entries.
[Back: 32-bit LX Header]
[Next: Object Table]