diff --git a/blk/750 b/blk/750 index a127da9..d90f2f3 100644 --- a/blk/750 +++ b/blk/750 @@ -1 +1 @@ -1 5 LOADR+ +1 6 LOADR+ diff --git a/blk/753 b/blk/753 index 69ac38b..10391db 100644 --- a/blk/753 +++ b/blk/753 @@ -3,6 +3,7 @@ 0xf4 OP1 HLT, 0xfc OP1 CLD, 0xfd OP1 STD, ( no argument, jumps with relative addrs are special ) 0xeb OP1 JMPs, 0xe9 OP1 JMPn, 0x74 OP1 JZ, + 0xe8 OP1 CALLn, : MOVri, SWAP 0xb0 OR A, A, ; : MOVxi, SWAP 0xb8 OR A, SPLITB A, A, ; : MOVsx, 0x8e A, SWAP 3 LSHIFT OR 0xc0 OR A, ; diff --git a/blk/755 b/blk/755 index e0bb0f9..ba1f378 100644 --- a/blk/755 +++ b/blk/755 @@ -4,6 +4,7 @@ : BREAK?, DUP 0x8000 AND IF 0x7fff AND 1 ALLOT THEN, -1 ALLOT THEN ; ) -: AGAIN, ( BREAK?, ) PC - 1- A, ; -: BWR @ AGAIN, ; - +: RPCs, PC - 1- A, ; : RPCn, PC - 2- A,, ; +: AGAIN, ( BREAK?, ) RPCs, ; +( Use RPCx with appropriate JMP/CALL op. Example: + JMPs, 0x42 RPCs, or CALLn, 0x1234 RPCn, ) diff --git a/blk/756 b/blk/756 new file mode 100644 index 0000000..fbe8fcb --- /dev/null +++ b/blk/756 @@ -0,0 +1,4 @@ +: CODE ( same as CREATE, but with native word ) + (entry) + 23 C, ( 23 == nativeWord ) ; +: ;CODE ; diff --git a/blk/812 b/blk/812 index 2a75392..78a7db9 100644 --- a/blk/812 +++ b/blk/812 @@ -6,7 +6,7 @@ JMPn, 0 A,, ( 00, main ) JMPn, 0 A,, ( 03, find ) JMPn, 0 A,, ( 0e compiledWord ) JMPn, 0 A,, ( 11, pushRS ) JMPn, 0 A,, ( 14, popRS ) JMPn, 0 A,, ( 17, nativeWord ) -JMPn, 0 A,, ( 1a, next ) JMPn, 0 A,, ( 1d, chkPS ) +JMPn, 0 A,, ( 1a, next ) JMPn, 0 A,, ( 1d, unused ) 0 A, 0 A, ( 20, numberWord ) 0 A, 0 A, ( 22, litWord ) 0 A, 0 A, ( 24, addrWord ) 0 A, 0 A, ( 26, unused ) 0 A, 0 A,, ( unused ) diff --git a/blk/813 b/blk/813 index 0192d43..d114631 100644 --- a/blk/813 +++ b/blk/813 @@ -1,3 +1,14 @@ -PC 3 - ORG @ 1+ ! ( main ) - AH 0x0e MOVri, ( print char ) AL 'X' MOVri, 0x10 INT, +( BOOT DICT: There are only 3 words in the boot dict, but + these words' offset need to be stable, so they're part of + the "stable ABI" ) +'E' A, 'X' A, 'I' A, 'T' A, +0 A,, ( prev ) +4 A, +H@ XCURRENT ! ( set current tip of dict, 0x42 ) + 0x17 A, ( nativeWord ) HLT, +CODE FOO +L1 BSET + AH 0x0e MOVri, ( print char ) AL 'X' MOVri, 0x10 INT, + L2 BSET JMPs, L2 @ RPCs, +;CODE diff --git a/blk/814 b/blk/814 new file mode 100644 index 0000000..7b2beb0 --- /dev/null +++ b/blk/814 @@ -0,0 +1,2 @@ +PC 3 - ORG @ 1+ ! ( main ) + JMPs, L1 @ RPCs, diff --git a/recipes/pcat/xcomp.fs b/recipes/pcat/xcomp.fs index bcfa300..b83a675 100644 --- a/recipes/pcat/xcomp.fs +++ b/recipes/pcat/xcomp.fs @@ -1,4 +1,6 @@ -750 LOAD -812 813 LOADR +750 LOAD ( 8086 asm ) +262 LOAD ( xcomp ) +270 LOAD ( xcomp overrides ) +812 814 LOADR ORG @ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC!