From 53239c8f84499f1f002c94c2583390a67da80fe5 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 19 Sep 2020 19:44:15 -0400 Subject: [PATCH] De-stabilize (n) --- blk/263 | 9 +++------ blk/264 | 4 ++++ blk/265 | 2 +- blk/270 | 2 +- blk/283 | 2 +- blk/306 | 1 - blk/397 | 2 +- blk/805 | 3 +-- blk/812 | 1 - cvm/forth.bin | Bin 5220 -> 5204 bytes cvm/xcomp.fs | 3 +-- doc/impl.txt | 2 +- 12 files changed, 14 insertions(+), 17 deletions(-) diff --git a/blk/263 b/blk/263 index eb8ed08..24b3f1b 100644 --- a/blk/263 +++ b/blk/263 @@ -5,11 +5,8 @@ CREATE XCURRENT 0 , : _xapply ( a -- a-off ) DUP ORG @ > IF ORG @ - BIN( @ + THEN ; : XFIND XCURRENT @ SWAP _find DROP _xapply ; -: X' XCON ' XCOFF ; : X['] XCON ' _xapply LITN XCOFF ; -: XCOMPILE XCON ' _xapply LITN +: XLITN LIT" (n)" XFIND , , ; +: X' XCON ' XCOFF ; : X['] XCON ' _xapply XLITN XCOFF ; +: XCOMPILE XCON ' _xapply XLITN LIT" ," FIND DROP _xapply , XCOFF ; : X[COMPILE] XCON ' _xapply , XCOFF ; -: XDO LIT" 2>R" XFIND , H@ ; -: XLOOP LIT" (loop)" XFIND , H@ - C, ; -: XIF LIT" (?br)" XFIND , H@ 1 ALLOT ; -: XELSE LIT" (br)" XFIND , 1 ALLOT [COMPILE] THEN H@ 1- ; diff --git a/blk/264 b/blk/264 index ff054f5..0f0a625 100644 --- a/blk/264 +++ b/blk/264 @@ -1,3 +1,7 @@ +: XDO LIT" 2>R" XFIND , H@ ; +: XLOOP LIT" (loop)" XFIND , H@ - C, ; +: XIF LIT" (?br)" XFIND , H@ 1 ALLOT ; +: XELSE LIT" (br)" XFIND , 1 ALLOT [COMPILE] THEN H@ 1- ; : XAGAIN LIT" (br)" XFIND , H@ - C, ; : XUNTIL LIT" (?br)" XFIND , H@ - C, ; : XLIT" diff --git a/blk/265 b/blk/265 index f8fcd2c..8b24ef4 100644 --- a/blk/265 +++ b/blk/265 @@ -8,7 +8,7 @@ ELSE ( w ) 0x02 RAM+ @ SWAP ( cur w ) _find ( a f ) IF DUP IMMED? NOT IF ABORT THEN EXECUTE - ELSE (parse) LITN THEN + ELSE (parse) XLITN THEN THEN AGAIN ; diff --git a/blk/270 b/blk/270 index 615258c..64202a4 100644 --- a/blk/270 +++ b/blk/270 @@ -5,7 +5,7 @@ : DO XDO ; IMMEDIATE : LOOP XLOOP ; IMMEDIATE : IF XIF ; IMMEDIATE : ELSE XELSE ; IMMEDIATE : AGAIN XAGAIN ; IMMEDIATE : UNTIL XUNTIL ; IMMEDIATE -: LIT" XLIT" ; IMMEDIATE +: LIT" XLIT" ; IMMEDIATE : LITN XLITN ; : IMMEDIATE XIMM ; : (entry) (xentry) ; : CREATE XCREATE ; diff --git a/blk/283 b/blk/283 index 5936e2e..cf18906 100644 --- a/blk/283 +++ b/blk/283 @@ -5,7 +5,7 @@ NOP, NOP, ( 06, uflw ) NOP, NOP, ( 08, LATEST ) NOP, ( unused ) 0 JP, ( RST 10 ) NOP, NOP, ( 13, oflw ) NOP, NOP, NOP, NOP, NOP, ( unused ) 0 JP, ( 1a, next ) NOP, NOP, NOP, ( unused ) -0 JP, ( RST 20 ) 0 A, 0 JP, ( 23, (n) ) NOP, ( unused ) +0 JP, ( RST 20 ) 0 A, 0 A, 0 A, 0 A, 0 A, ( unused ) 0 JP, ( RST 28 ) 0 A, 0 A, 0 A, 0 A, 0 A, ( unused ) 0 JP, ( RST 30 ) 0 A, 0 A, 0 A, 0 A, 0 A, ( unused ) 0 JP, ( RST 38 ) diff --git a/blk/306 b/blk/306 index 2a8432b..cd12709 100644 --- a/blk/306 +++ b/blk/306 @@ -1,5 +1,4 @@ CODE (n) ( number literal ) -PC ORG @ 0x25 + ! ( stable ABI JP ) ( Literal value to push to stack is next to (n) reference in the atom list. That is where IP is currently pointing. Read, push, then advance IP. ) diff --git a/blk/397 b/blk/397 index 46be1f7..d9a3609 100644 --- a/blk/397 +++ b/blk/397 @@ -3,7 +3,7 @@ : DO COMPILE 2>R H@ ; IMMEDIATE : LOOP COMPILE (loop) H@ - _bchk C, ; IMMEDIATE ( LEAVE is implemented in low xcomp ) -: LITN 0x23 ( n ) , , ; +: LITN COMPILE (n) , ; ( gets its name at the very end. can't comment afterwards ) : _ BEGIN LIT" )" WORD S= UNTIL ; IMMEDIATE : _ ( : will get its name almost at the very end ) diff --git a/blk/805 b/blk/805 index 1f15d5b..6db43f3 100644 --- a/blk/805 +++ b/blk/805 @@ -6,5 +6,4 @@ JMPn, 0 A,, ( 00, main ) 0 A, ( 03, boot driveno ) JMPn, 0 A,, ( 0b, EXIT ) 0 A,, 0 A,, ( unused ) 0 A,, ( 13, oflw ) 0 A,, 0 A,, 0 A, ( unused ) -JMPn, 0 A,, ( 1a, next ) 0 A,, 0 A,, 0 A,, ( unused ) -0 A, JMPn, 0 A,, ( 23, (n) ) +JMPn, 0 A,, ( 1a, next ) diff --git a/blk/812 b/blk/812 index 9c9e590..9512b18 100644 --- a/blk/812 +++ b/blk/812 @@ -1,5 +1,4 @@ CODE (n) ( number literal ) -PC 0x27 - ORG @ 0x25 + ! ( stable abi ) DI DX MOVxx, DI [DI] MOVx[], DI PUSHx, DX INCx, DX INCx, ;CODE diff --git a/cvm/forth.bin b/cvm/forth.bin index d7ccc3e98a6507b16fcbc8c8bd945a29990b4e0b..d7d809d061a2c2a9a60ed85cab8487c677b7fbf8 100644 GIT binary patch literal 5204 zcma)AU2N0W6+idy#NUY%proZqYbT_!9pZenv?U9PKjH)j$2PVDWPvsbBmxnVED5FU z&^lVLWm=igA~B^e;Q=jqn9wSRyTz z|L-~XeBJYP&qYM!dhNQmV+$7M-|xN2gQ=oOg-CF6A!Nrw1^cjaNTpc8nYp?7kW=hp z3(kfr#U_=(Mg6sR_2vmz^yVwX5=Xw5A7@v-msnTwU@|dMOuED&?tHdLoTq;z$FH{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