5955634d14
FossilOrigin-Name: c9ac0e5c8be62c047d1bacb8160cc3bb9203a6abf051a26b247c667e87db8786
22 lines
519 B
Forth
22 lines
519 B
Forth
Blocks allow for a simple storage subsystem. In the smaller ilo
|
|
and napia based systems, they are mandatory and are the primary
|
|
means of data and code storage
|
|
|
|
Under RetroForth/nga, this is optional, but is enabled by
|
|
default.
|
|
|
|
The exposed word set is compact:
|
|
|
|
block:set-file (s-)
|
|
block:read (na-)
|
|
block:write (na-)
|
|
|
|
~~~
|
|
{{
|
|
:block:invoke #3 io:scan-for io:invoke ;
|
|
---reveal---
|
|
:block:read (na-) #0 block:invoke ;
|
|
:block:write (na-) #1 block:invoke ;
|
|
:block:set-file (s-) #2 block:invoke ;
|
|
}}
|
|
~~~
|