1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-13 09:18:05 +11:00
collapseos/blk/041
Virgil Dupras b21be43535 Move 8086 assembler from B730 to B30
Also, move doc to doc/asm.txt.

Also, fix the pcat recipe which was broken since the overlay change.
I hadn't noticed it because I didn't have to rebuild the MBR.
2020-09-21 19:24:54 -04:00

17 lines
460 B
Plaintext

( Place BEGIN, where you want to jump back and AGAIN after
a relative jump operator. Just like BSET and BWR. )
: BEGIN, PC ;
: BSET PC SWAP ! ;
( same as BSET, but we need to write a placeholder )
: FJR, PC 0 A, ;
: IFZ, JNZ, FJR, ;
: IFNZ, JZ, FJR, ;
: IFC, JNC, FJR, ;
: IFNC, JC, FJR, ;
: THEN,
DUP PC ( l l pc )
-^ 1- ( l off )
( warning: l is a PC offset, not a mem addr! )
SWAP ORG @ + BIN( @ - ( off addr )
C! ;