From eefbf66e9587f6877d4481245edf420d12c95559 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sat, 19 Sep 2020 13:54:01 -0400 Subject: [PATCH] De-stabilize (br), (?br), (loop), (s) When writing the xcomp documentation, I realized that with careful threading and by accepting a bit of code duplication in the xcomp toolset, I could de-stabilize a couple of words. (n) and EXIT are a bit trickier, but I think it can be done. It would be nice to get rid of stable wordrefs... --- blk/262 | 2 +- blk/263 | 20 ++++++++++---------- blk/264 | 17 +++-------------- blk/270 | 4 ++++ blk/283 | 6 ++---- blk/297 | 2 -- blk/298 | 1 - blk/307 | 1 - blk/326 | 2 +- blk/397 | 4 ++-- blk/398 | 4 ++-- blk/399 | 6 +++--- blk/805 | 6 ------ blk/806 | 2 -- blk/807 | 1 - blk/812 | 1 - blk/813 | 1 - cvm/forth.bin | Bin 5294 -> 5262 bytes cvm/xcomp.fs | 10 ---------- doc/impl.txt | 10 ++++------ 20 files changed, 32 insertions(+), 68 deletions(-) diff --git a/blk/262 b/blk/262 index 570d9e6..2a492bf 100644 --- a/blk/262 +++ b/blk/262 @@ -1 +1 @@ -1 LOAD+ 3 LOAD+ 6 LOAD+ +1 3 LOADR+ diff --git a/blk/263 b/blk/263 index 9d750ba..6b47543 100644 --- a/blk/263 +++ b/blk/263 @@ -1,15 +1,15 @@ CREATE XCURRENT 0 , -: XCON XCURRENT CURRENT* ! ; -: XCOFF 0x02 RAM+ CURRENT* ! ; -: (xentry) XCON (entry) XCOFF ; -: XCREATE (xentry) 2 C, ; -: XCODE XCON CODE XCOFF ; -: XIMM XCON IMMEDIATE XCOFF ; +: XCON XCURRENT CURRENT* ! ; : XCOFF 0x02 RAM+ CURRENT* ! ; +: (xentry) XCON (entry) XCOFF ; : XCREATE (xentry) 2 C, ; +: XCODE XCON CODE XCOFF ; : XIMM XCON IMMEDIATE XCOFF ; : _xapply ( a -- a-off ) DUP ORG @ > IF ORG @ - BIN( @ + THEN ; -: X' XCON ' XCOFF ; -: X['] XCON ' _xapply LITN XCOFF ; -: XCOMPILE - XCON ' _xapply LITN +: XFIND XCURRENT @ SWAP _find DROP _xapply ; +: X' XCON ' XCOFF ; : X['] XCON ' _xapply LITN XCOFF ; +: XCOMPILE XCON ' _xapply LITN 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 5086412..c473f4e 100644 --- a/blk/264 +++ b/blk/264 @@ -1,14 +1,3 @@ -The "X:" word - -Because the ";" word goes back only one level in RSP and -this limits our ability to separate X: in sub words and this -means a rather cramped B265. This means no inline comments, -hence this block here. - -0x0e is compiledWord. first _find is on xdict. If found, we -compile it with offsets. We abort on IMMED? because we're -never supposed to encounter an immediate at this point. - -If not found, we try the same word on system dict (RAM+02). -If found and is immediate, execute. If found and not immediate, -error. If not found, try number. +: XAGAIN LIT< (br) XFIND , H@ - C, ; +: XUNTIL LIT< (?br) XFIND , H@ - C, ; +: XLIT< LIT< (s) XFIND , WORD DUP C@ 1+ MOVE, ; diff --git a/blk/270 b/blk/270 index 4183506..6e287c6 100644 --- a/blk/270 +++ b/blk/270 @@ -2,6 +2,10 @@ : ['] X['] ; IMMEDIATE : COMPILE XCOMPILE ; IMMEDIATE : [COMPILE] X[COMPILE] ; IMMEDIATE +: DO XDO ; IMMEDIATE : LOOP XLOOP ; IMMEDIATE +: IF XIF ; IMMEDIATE : ELSE XELSE ; IMMEDIATE +: AGAIN XAGAIN ; IMMEDIATE : UNTIL XUNTIL ; IMMEDIATE +: LIT< XLIT< ; IMMEDIATE : IMMEDIATE XIMM ; : (entry) (xentry) ; : CREATE XCREATE ; diff --git a/blk/283 b/blk/283 index 46a4447..5936e2e 100644 --- a/blk/283 +++ b/blk/283 @@ -6,8 +6,6 @@ NOP, NOP, ( 06, uflw ) NOP, NOP, ( 08, LATEST ) NOP, ( unused ) 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 28 ) 0 A, 0 JP, ( 2b, (s) ) NOP, ( unused ) -0 JP, ( RST 30 ) 0 A, 0 JP, ( 33, 2>R ) NOP, ( 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 ) -0 A, 0 JP, ( 3b, (br) ) 0 A, 0 JP, ( 3f, (?br) ) -0 A, 0 JP, ( 43, (loop) ) diff --git a/blk/297 b/blk/297 index 849c92c..119318b 100644 --- a/blk/297 +++ b/blk/297 @@ -1,12 +1,10 @@ CODE (br) L1 BSET ( used in ?br and loop ) -PC ORG @ 0x3d + ! ( stable ABI JP ) LDA(BC), H 0 LDri, L A LDrr, RLA, IFC, H DECr, THEN, BC ADDHLd, B H LDrr, C L LDrr, ;CODE CODE (?br) -PC ORG @ 0x41 + ! ( stable ABI JP ) HL POP, HLZ, JRZ, L1 BWR ( br + 1. False, branch ) diff --git a/blk/298 b/blk/298 index fcea6e2..210b73b 100644 --- a/blk/298 +++ b/blk/298 @@ -1,5 +1,4 @@ CODE (loop) -PC ORG @ 0x45 + ! ( stable ABI JP ) 0 IX+ INC(IXY+), IFZ, 1 IX+ INC(IXY+), THEN, ( I++ ) ( Jump if I <> I' ) A 0 IX+ LDrIXY, 2 IX- CP(IXY+), JRNZ, L1 BWR ( branch ) diff --git a/blk/307 b/blk/307 index 3f135a7..8628e38 100644 --- a/blk/307 +++ b/blk/307 @@ -1,5 +1,4 @@ CODE (s) ( string literal ) -PC ORG @ 0x2d + ! ( stable ABI JP ) ( Like (n) but instead of being followed by a 2 bytes number, it's followed by a string. When called, puts the string's address on PS ) diff --git a/blk/326 b/blk/326 index dc5676f..077c9ca 100644 --- a/blk/326 +++ b/blk/326 @@ -1,7 +1,7 @@ CODE R> L 0 IX+ LDrIXY, H 1 IX+ LDrIXY, IX DECd, IX DECd, HL PUSH, ;CODE -CODE 2>R PC ORG @ 0x35 + ! ( stable ABI JP ) +CODE 2>R DE POP, HL POP, chkPS, IX INCd, IX INCd, 0 IX+ L LDIXYr, 1 IX+ H LDIXYr, IX INCd, IX INCd, 0 IX+ E LDIXYr, 1 IX+ D LDIXYr, diff --git a/blk/397 b/blk/397 index 435ff53..d12afb4 100644 --- a/blk/397 +++ b/blk/397 @@ -1,7 +1,7 @@ ( Now we have "as late as possible" stuff. See bootstrap doc. ) : _bchk DUP 0x7f + 0xff > IF LIT< br-ovfl (print) ABORT THEN ; -: DO 0x33 ( 2>R ) , H@ ; IMMEDIATE -: LOOP 0x43 ( loop ) , H@ - _bchk C, ; IMMEDIATE +: DO COMPILE 2>R H@ ; IMMEDIATE +: LOOP COMPILE (loop) H@ - _bchk C, ; IMMEDIATE ( LEAVE is implemented in low xcomp ) : LITN 0x23 ( n ) , , ; ( gets its name at the very end. can't comment afterwards ) diff --git a/blk/398 b/blk/398 index f5d0ad5..5770c55 100644 --- a/blk/398 +++ b/blk/398 @@ -1,11 +1,11 @@ : IF ( -- a | a: br cell addr ) - 0x3f ( ?br ) , H@ 1 ALLOT ( br cell allot ) + COMPILE (?br) H@ 1 ALLOT ( br cell allot ) ; IMMEDIATE : THEN ( a -- | a: br cell addr ) DUP H@ -^ _bchk SWAP ( a-H a ) C! ; IMMEDIATE : ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell ) - 0x3b ( br ) , + COMPILE (br) 1 ALLOT [COMPILE] THEN H@ 1- ( push a. 1- for allot offset ) diff --git a/blk/399 b/blk/399 index 77e0abe..46ab344 100644 --- a/blk/399 +++ b/blk/399 @@ -1,7 +1,7 @@ -: LIT< 0x2b ( s ) , WORD DUP C@ 1+ MOVE, ; IMMEDIATE +: LIT< COMPILE (s) WORD DUP C@ 1+ MOVE, ; IMMEDIATE : BEGIN H@ ; IMMEDIATE -: AGAIN 0x3b ( br ) , H@ - _bchk C, ; IMMEDIATE -: UNTIL 0x3f ( ?br ) , H@ - _bchk C, ; IMMEDIATE +: AGAIN COMPILE (br) H@ - _bchk C, ; IMMEDIATE +: UNTIL COMPILE (?br) H@ - _bchk C, ; IMMEDIATE : [ INTERPRET ; IMMEDIATE : ] R> DROP ; : COMPILE ' LITN ['] , , ; IMMEDIATE diff --git a/blk/805 b/blk/805 index 8153776..1f15d5b 100644 --- a/blk/805 +++ b/blk/805 @@ -8,9 +8,3 @@ JMPn, 0 A,, ( 0b, EXIT ) 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) ) -0 A,, 0 A,, ( unused ) -0 A, JMPn, 0 A,, ( 2b, (s) ) 0 A, ( unused ) -0 A, 0 A,, ( unused ) -0 A, JMPn, 0 A,, ( 33, 2>R ) 0 A, 0 A, 0 A,, ( unused ) -0 A, JMPn, 0 A,, ( 3b, (br) ) 0 A, JMPn, 0 A,, ( 3f, (?br) ) -0 A, JMPn, 0 A,, ( 43, (loop) ) diff --git a/blk/806 b/blk/806 index 11e23f7..b517fba 100644 --- a/blk/806 +++ b/blk/806 @@ -1,12 +1,10 @@ ( TODO: move these words with other native words. ) H@ 4 + XCURRENT ! ( make next CODE have 0 prev field ) CODE (br) L1 BSET ( used in ?br ) -PC 0x3f - ORG @ 0x3d + ! ( stable abi ) DI DX MOVxx, AL [DI] MOVr[], AH AH XORrr, CBW, DX AX ADDxx, ;CODE CODE (?br) -PC 0x43 - ORG @ 0x41 + ! ( stable abi ) AX POPx, AX AX ORxx, JZ, L1 @ RPCs, ( False, branch ) ( True, skip next byte and don't branch ) DX INCx, diff --git a/blk/807 b/blk/807 index 3a2a8c9..fa2ea22 100644 --- a/blk/807 +++ b/blk/807 @@ -1,5 +1,4 @@ CODE (loop) -PC 0x47 - ORG @ 0x45 + ! ( stable abi ) [BP] 0 INC[w]+, ( I++ ) ( Jump if I <> I' ) AX [BP] 0 MOVx[]+, AX [BP] -2 CMPx[]+, diff --git a/blk/812 b/blk/812 index 2b01c01..9c9e590 100644 --- a/blk/812 +++ b/blk/812 @@ -4,7 +4,6 @@ PC 0x27 - ORG @ 0x25 + ! ( stable abi ) DX INCx, DX INCx, ;CODE CODE (s) ( string literal, see B287 ) -PC 0x2f - ORG @ 0x2d + ! ( stable abi ) DI DX MOVxx, ( IP ) AH AH XORrr, AL [DI] MOVr[], ( slen ) DX PUSHx, DX INCx, DX AX ADDxx, diff --git a/blk/813 b/blk/813 index b79dff3..8541046 100644 --- a/blk/813 +++ b/blk/813 @@ -5,7 +5,6 @@ CODE R> [BP] 0 PUSH[w]+, BP DECx, BP DECx, ;CODE CODE 2>R -PC 0x37 - ORG @ 0x35 + ! ( stable abi ) [BP] 4 POP[w]+, [BP] 2 POP[w]+, BP 4 ADDxi, ;CODE CODE 2R> 2 chkPS, diff --git a/cvm/forth.bin b/cvm/forth.bin index c7d1ca8ba26001f738abe251fb10f0f91360b65d..d11ba800b7537e28d95157fbd50e65e7aa92d03f 100644 GIT binary patch literal 5262 zcma)AU2N0W6+icH$98PT`G7*&1{%kK*oh7KXjqp8f5di*gJZk4L-<&VNJvCR8b=8& z@UXQVtZW)D?X2;#N|mBfr4I|z9^hqYl|XywrV3S}+DA2seNpw%T~tr4MGxB6gAB^m537g$l;7a!Q?8 z!G%g?DdZA|*n*3pIoURwAxQqER zah}vffp2dN3+ib|74v%GD@`W!qA`CUUF23%A(PzCMRRbuvap~nXz3?C&DzwzAz^c= zms%g|D)F@?kxNm**1R^U^!3 zT)Q7WIyb*~oNh#V$-b+P&)tze67}}=@YUBB;j6!2Lj(O9db(KJml-YdFb1;^mV1hc z@gDe~0`kg#T9ijdGP#}x4T})omoBCaY?n^}Cnt)DyU2L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xw9_e*KlphIm$zkO1>cBMD+T7O6si+z2 PzV>FH0eu901nvI=!p50D diff --git a/cvm/xcomp.fs b/cvm/xcomp.fs index d2ce8b1..eecf038 100644 --- a/cvm/xcomp.fs +++ b/cvm/xcomp.fs @@ -15,16 +15,6 @@ H@ ORG ! 0 C, 0 C, ( EXIT ) 0x16 ALLOT0 0 C, 0x05 C, ( (n) ) -0x6 ALLOT0 -0 C, 0x06 C, ( (s) ) -0x6 ALLOT0 -0 C, 0x04 C, ( 2>R ) -0x6 ALLOT0 -0 C, 0x01 C, ( (br) ) -0x2 ALLOT0 -0 C, 0x02 C, ( (?br) ) -0x2 ALLOT0 -0 C, 0x03 C, ( (loop) ) ( END OF STABLE ABI ) H@ 4 + XCURRENT ! ( make next CODE have 0 prev field ) 0x00 CODE EXIT diff --git a/doc/impl.txt b/doc/impl.txt index 360a080..a36c1ec 100644 --- a/doc/impl.txt +++ b/doc/impl.txt @@ -195,9 +195,7 @@ otherwise be difficult to access. Here's the complete list of these references: 04 BOOT addr 06 (uflw) addr 08 LATEST -13 (oflw) addr 2b (s) wordref 33 2>R wordref -42 EXIT wordref 53 (br) wordref 67 (?br) wordref -80 (loop) wordref bf (n) wordref +0b EXIT wordref 13 (oflw) addr 23 (n) wordref BOOT, (uflw) and (oflw) exist because they are referred to before those words are defined (in core words). LATEST is a @@ -205,9 +203,9 @@ critical part of the initialization sequence. Stable wordrefs are there for more complicated reasons. When cross-compiling Collapse OS, we use immediate words from the -host and some of them compile wordrefs (IF compiles (?br), -LOOP compiles (loop), etc.). These compiled wordref need to -be stable across binaries, so they're part of the stable ABI. +host and some of them compile wordrefs (LITN compiles (n), +";" compiles EXIT). These compiled wordref need to be stable +across binaries, so they're part of the stable ABI. Another layer of complexity is the fact that some binaries don't begin at offset 0. In that case, the stable ABI doesn't