mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-23 19:58:06 +11:00
650481f849
Only its jump at 0x33 remains. I've also fixed a strange offset oddity in 8086's (n) placement. It was off by 2, but strangely, it ran properly. Anyway, now it's fixed.
17 lines
561 B
Plaintext
17 lines
561 B
Plaintext
CODE ROT ( a b c -- b c a ) 3 chkPS,
|
|
CX POPx, BX POPx, AX POPx,
|
|
BX PUSHx, CX PUSHx, AX PUSHx,
|
|
;CODE
|
|
CODE DUP 1 chkPS, AX POPx, AX PUSHx, AX PUSHx, ;CODE
|
|
CODE ?DUP 1 chkPS, AX POPx, AX AX ORxx, AX PUSHx,
|
|
IFNZ, AX PUSHx, THEN, ;CODE
|
|
CODE DROP 1 chkPS, AX POPx, ;CODE
|
|
CODE SWAP AX POPx, BX POPx, AX PUSHx, BX PUSHx, ;CODE
|
|
CODE OVER ( a b -- a b a ) 2 chkPS,
|
|
DI SP MOVxx, AX [DI] 2 MOVx[]+, AX PUSHx, ;CODE
|
|
CODE PICK
|
|
DI POPx, DI SHLx1, ( x2 )
|
|
CX DI MOVxx, CX 2 ADDxi, CALLn, lblchkPS @ RPCn,
|
|
DI SP ADDxx, DI [DI] MOVx[], DI PUSHx,
|
|
;CODE
|