Mirror of CollapseOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
522B

  1. lblchkPS BSET ( CX -> expected size )
  2. AX PS_ADDR MOVxI, AX SP SUBxx, 2 SUBAXI, ( CALL adjust )
  3. AX CX CMPxx,
  4. IFNC, ( we're good ) RETn, THEN,
  5. ( underflow ) DI 0x06 MOVxm, JMPs, lblexec @ RPCs,
  6. PC 3 - ORG @ 1+ ! ( main )
  7. DX POPx, ( boot drive no ) 0x03 DL MOVmr,
  8. SP PS_ADDR MOVxI, BP RS_ADDR MOVxI,
  9. DI 0x08 MOVxm, ( LATEST )
  10. ( HERE begins at CURRENT )
  11. SYSVARS 0x4 ( HERE ) + DI MOVmx,
  12. SYSVARS 0x2 ( CURRENT ) + DI MOVmx,
  13. DI 0x04 ( BOOT ) MOVxm,
  14. JMPn, lblexec @ RPCn, ( execute )