2020-07-05 22:54:22 +10:00
|
|
|
lblchkPS BSET ( CX -> expected size )
|
|
|
|
AX PS_ADDR MOVxI, AX SP SUBxx, 2 SUBAXI, ( CALL adjust )
|
|
|
|
AX CX CMPxx,
|
2020-09-26 09:39:31 +10:00
|
|
|
IFNC, ( we're good ) RET, THEN,
|
2020-07-05 22:54:22 +10:00
|
|
|
( underflow ) DI 0x06 MOVxm, JMPs, lblexec @ RPCs,
|
2020-07-06 04:13:01 +10:00
|
|
|
|
|
|
|
PC 3 - ORG @ 1+ ! ( main )
|
|
|
|
DX POPx, ( boot drive no ) 0x03 DL MOVmr,
|
|
|
|
SP PS_ADDR MOVxI, BP RS_ADDR MOVxI,
|
|
|
|
DI 0x08 MOVxm, ( LATEST )
|
|
|
|
( HERE begins at CURRENT )
|
|
|
|
SYSVARS 0x4 ( HERE ) + DI MOVmx,
|
|
|
|
SYSVARS 0x2 ( CURRENT ) + DI MOVmx,
|
|
|
|
DI 0x04 ( BOOT ) MOVxm,
|
|
|
|
JMPn, lblexec @ RPCn, ( execute )
|