Node 208
This node allows communication between interpreter and SRAM.
Source code
208 buffer to/from sram
2D5 org --u/mod 0 org
read 00 n a ! 5616 +read ! 199 dup push ! !
begin @ !b unext ;
write 06 n a ! 562A +write ! 199 dup push ! !
begin @b ! unext ;
1- 0C -1 . + ;
cmds 0E a ! 5616 +read ! 15 dup ! dup dup or !
for @ !b unext ;
ers 15 3AEBA 3b. a ! 562A +write ! 15 dup ! dup dup or !
for dup ! unext ;
mark 1D n-mx push dup or pop -3 --u/mod -rq
push push A000 red zif pop ;
err 29 n mark up dup a! ! 562A +write ! 15 dup ! dup dup or !
for if @b ! 1- else over @b or ! 1- then next ;
rfsh 39 a right a! 561F disp ! 1 ! a! ; 3F
init up a! down b! -dl- ; 44
3 d 0 0 ether
2D5 org --u/mod 0 org
read 00 n a ! 5616 +read ! 199 dup push ! !
begin @ !b unext ;
write 06 n a ! 562A +write ! 199 dup push ! !
begin @b ! unext ;
1- 0C -1 . + ;
cmds 0E a ! 5616 +read ! 15 dup ! dup dup or !
for @ !b unext ;
ers 15 3AEBA 3b. a ! 562A +write ! 15 dup ! dup dup or !
for dup ! unext ;
mark 1D n-mx push dup or pop -3 --u/mod -rq
push push A000 red zif pop ;
err 29 n mark up dup a! ! 562A +write ! 15 dup ! dup dup or !
for if @b ! 1- else over @b or ! 1- then next ;
rfsh 39 a right a! 561F disp ! 1 ! a! ; 3F
init up a! down b! -dl- ; 44
3 d 0 0 ether
Definitions
- read
- Read 200 18-bit words from address n in SRAM and send them DOWN.
- write
- Write 200 18-bit read from DOWN words to address n in SRAM. In both read and write we first send a focus call (store content of A), then call +read or +write, send number of words to read/write, and starting address in the current page.
- 1-
- Decrement T. A useful factor.
- cmds
- .
- ers
- .
- mark
- .
- err
- .
- rfsh
- .
- init
- Set A to point to node 108, B to node 308, and jump to DOWN and LEFT.