7.6.2.2280 THRU BLOCK EXT
( i * x u1 u2 -- j * x )
LOAD the mass storage blocks numbered u1 through u2 in sequence. Other stack effects are due to the words LOADed.
ContributeContributions
JimPeterson [278] Possible Reference ImplementationSuggested reference implementation2023-02-11 15:56:14
: THRU 1+ SWAP DO I LOAD LOOP ;
(simple, but it's good to have a reference)
Also, there's this for a possible test case:
\ \ \ \ WARNING! This could corrupt your "mass storage" accessible through BLOCK:
: GT1
1 BLOCK 1024 BLANK
S" 1 2 3" 1 BLOCK SWAP CMOVE
UPDATE
2 BLOCK 1024 BLANK
S" 4 5 6" 2 BLOCK SWAP CMOVE
UPDATE
;
: GT2 1 1 THRU + - ;
T{ GT1 -> }T ( TEST THRU IN INTERP. STATE )
T{ 1 2 THRU -> 1 2 3 4 5 6 }T
T{ GT2 -> -4 }T ( TEST THRU IN EXECUTE STATE )