From 231d727598a45446830f7016335a425fd8b94466 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Tue, 12 May 2020 07:21:34 -0400 Subject: [PATCH] Move a few words from core to xcomp core --- blk/391 | 10 +++++----- blk/392 | 6 ++++++ blk/407 | 6 ++---- blk/412 | 7 +++++++ blk/429 | 7 ------- blk/431 | 2 -- emul/forth.bin | Bin 5978 -> 5974 bytes 7 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 blk/429 diff --git a/blk/391 b/blk/391 index 99af87b..394668d 100644 --- a/blk/391 +++ b/blk/391 @@ -9,8 +9,8 @@ unusable directly. For the same reason, any reference to a word in the host system will obviously be wrong in the target system. More details in B260. -This unit is loaded in two "low" and "high" parts. The low part -is the biggest chunk and has the most definitions. The high -part is the "sensitive" chunk and contains "LITN", ":" and ";" -definitions which, once defined, kind of make any more defs -impossible. (cont.) +These rules result in some practicals do's and dont's: + +1. IF, UNTIL, AGAIN are fine, but *not* LOOP. + + (cont.) diff --git a/blk/392 b/blk/392 index cb095cb..803eed9 100644 --- a/blk/392 +++ b/blk/392 @@ -1,3 +1,9 @@ +This unit is loaded in two "low" and "high" parts. The low part +is the biggest chunk and has the most definitions. The high +part is the "sensitive" chunk and contains "LITN", ":" and ";" +definitions which, once defined, kind of make any more defs +impossible. + The gap between these 2 parts is the ideal place to put device driver code. Load the low part with "393 LOAD", the high part with "415 LOAD" diff --git a/blk/407 b/blk/407 index f6a7134..f927ae3 100644 --- a/blk/407 +++ b/blk/407 @@ -1,10 +1,8 @@ : SCPY BEGIN ( a ) - DUP C@ ( a c ) + C@+ ( a+1 c ) DUP C, ( a c ) NOT IF DROP EXIT THEN - 1+ ( a+1 ) - AGAIN -; + AGAIN ; diff --git a/blk/412 b/blk/412 index 107cf36..f6196f1 100644 --- a/blk/412 +++ b/blk/412 @@ -1,3 +1,6 @@ +( Words here until the end of the low part, unlike words + preceeding them, aren't immediately needed for boot. But its + better to have as many words as possible in the xcomp part. ) : H@ HERE @ ; : IMMEDIATE CURRENT @ 1- @@ -5,4 +8,8 @@ ; : +! SWAP OVER @ + SWAP ! ; : -^ SWAP - ; +: / /MOD SWAP DROP ; +: MOD /MOD DROP ; + : ALLOT HERE +! ; +: CREATE (entry) 11 ( 11 == cellWord ) C, ; diff --git a/blk/429 b/blk/429 deleted file mode 100644 index 68efbdf..0000000 --- a/blk/429 +++ /dev/null @@ -1,7 +0,0 @@ -: CREATE - (entry) ( empty header with name ) - 11 ( 11 == cellWord ) - C, ( write it ) -; - - diff --git a/blk/431 b/blk/431 index a82bbc6..b62f8af 100644 --- a/blk/431 +++ b/blk/431 @@ -1,7 +1,5 @@ : VARIABLE CREATE 2 ALLOT ; : CONSTANT CREATE , DOES> @ ; -: / /MOD SWAP DROP ; -: MOD /MOD DROP ; ( In addition to pushing H@ this compiles 2>R so that loop variables are sent to PS at runtime ) diff --git a/emul/forth.bin b/emul/forth.bin index 99c64820cad48f9dc684e5f955ae9874d783c10f..26c548f639520792db04392a907a9fcaacbbdf0d 100644 GIT binary patch delta 1810 zcmY*ZZERCz6h800x1;TC@4fwWP#t$&*;;TDG2{DVy=#GPT}#^XF>x6vPzhtjZEg_8 zaCK-P#27)X0 znvMuUFWWJu?jH!kW&A)cBe^G)als`;L;CSO@l?i%Mg%*uY}fc_t{~I+qN{a>ChH); zBnB1sCNlw;Q7TN6^Ky;Jq5;WtKIuW9m1jl%_g&*#+#4Gb*<^mFonLmhw_kk>)}77d z3-L_B2X^JEylj8p9YVN7)(vF@tBFM7FL$d9%CbEIMUzyAa(2alqJszn`~&3)2K=tF z8Q*^^>843ng{@J$Y_h1RMSLT*L#aY@BTgs+o&06BlfB1h)mB#Kch%=seyvVPHb(^J zRq93D$mR;+5WJx*bC0&BXI}l-h8@a>K)`Z#D60mfcgv>bG_CHOWg%Vs)}2f5c7vq! zYrPt3YG1b#b)tg~W&WDBdh1Danlsap&Ad9Ug<+yJa!emCjp-*!uMQtW8dNY^Iu+9q zh5|~b&^g1u)AG@>dQDmoe$XmRh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