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 99c6482..26c548f 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ