, . -? : , ( ), - . . , .. , , , .
- . , , , . . , . , .
, -. .
1) PSP. $26.
2) 28 -, HeadExeType.
3)
LengExe = (PageCnt-l)*512 + PartPag
4) :
SeekExe = HdrSize*16
5) StartSeg .
StartSeg = Segment {PSP) +16, .. PSP, 256 (16 ).
6) LengExe, StartSeg:0000.
7) TablOff,
8) ( ReloCnt):
16- IternOfs, ItemSeg;
ReloSeg === StartSeg+ltemOfs, .. ;
ReloSeg:ltemOfs- ;
StartSeg ( );
ReloSeg:ltemOfs.
9)
MinMem .
10) :
|
|
ES DS , PSP',
( 0);
SS = StartSeg+ReloSS;
SP = ExeSP;
CS == StartSeg^ReloCS;
IP= Exelp;
. CS IP :
PUSH StartSeg+ReloCs
PUSH Exelp
RETF
( RETF - - IP CS).
, DS DS . , .. . SS , .. - , , ReloSS / ExelP. - ReloSS , , .. , - " . ExeSP , , ReloSS ExeSP .