7.6.1.1790 LOAD BLOCK
Save the current input-source specification. Store u in BLK (thus making block u the input source and setting the input buffer to encompass its contents), set >IN to zero, and interpret. When the parse area is exhausted, restore the prior input source specification. Other stack effects are due to the words LOADed.
An ambiguous condition exists if u is zero or is not a valid block number.
See:
ContributeContributions
mcondron [106] Getting the block contentsRequest for clarification2019-08-10 00:37:10
This word is surely intended to actually transfer the contents of the specified block from the mass storage device to a buffer, but this behavior is not described. From reading the description, it gives the impression that LOAD is meant to be run after a block has been transferred from mass storage. Is that the case? It's not what I get from reading historical documents on this -- it seems LOAD is meant to initiate a transfer of data.
Maybe what's intended is something like: "Save the current input source specification. Read block u from mass storage in the manner described in BLOCK. Make the block buffer where block u was saved be the input source. Set >IN to zero and interpret, then restore the prior input source specification."
JimPeterson [280] Possible Test CaseSuggested Testcase2023-02-11 16:39:10
Maybe this?:
\ \ \ \ WARNING! This could corrupt your "mass storage" accessible through BLOCK:
: GL1
1 BLOCK 1024 BLANK
S" 1 2 3" 1 BLOCK SWAP CMOVE
UPDATE
;
: GL2 1 LOAD + ;
T{ GL1 -> }T ( TEST LOAD IN INTERP. STATE )
T{ 1 LOAD -> 1 2 3 }T
T{ GL2 -> 1 5 }T ( TEST LOAD IN EXECUTE STATE )