AB>This is the first bit of code from a programm :
AB>MOV BP,AX
AB>MOV AX,ES
AB>ADD AX,10h
AB>What is stored in AX that the maker want's to keep?
AB>ES is the segment of the PSP, right?
(from the book "PC Interrupts" by Ralf Brown & Jim Kyle)
New executables begin running with the following register values:
AX = environment segment
BX = offset of command tail in environment segment
CX = size of automatic data segment
ES, BP = 0000h
DS = automatic data segment
SS:SP = initial stack
(from the TASM user's guide)
When you load an EXE program, the operating system sets up the registers as
follows:
DS, ES = PSP segment
CS:IP = start address
SS:SP = stack address
I think AX may also be loaded for the second one, which specifies the PSP.
n
the newer executable types as above, the PSP in real mode can be found by
subtracting 0010h from the value of CS.
((Cloud))
MauveCloud@juno.com
* OLX 2.2 * Words are not food, though sometimes we must eat them.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)
|