etherforth_logo

Node 109

This node copies content of a source block and its shadow to another destination. It also can wipe whole block. Both functions are performed upon request by Interpreter.

Source code

sram node 209 node 108 node 109
109 copy wipe
8 word buffer

8 org
a0 08 dup dup or a! right !b ;
r/w 0B ds-d a0 5616 +read !b 7 dup push !b !b begin @b !+ unext
wr 11 d a0 562A +write !b 7 dup push !b !b begin @+ !b unext ;
288* 17 n-m 2* 2* 2* 2* 2* dup dup or
8 for over . + unext push drop pop ;
8+ 1D 8 . + ;
fin 1F up a! ! ;
one 21 ds 31 for over over r/w 8+ over 8+ over next ;
copy 29 sd 288* over 288* one one fin ;
wipe 2E n dup dup or a! 39F3A eol eob b. ! 288* wr fin ; 34

init right b! ---u ; 37

1 l 5 d 1 r ether

Definitions

a0
Set A to zero and point B to RIGHT.
r/w
This word moves 8 18-bit words from one location in SRAM to another location using buffer defined at the beginning of node's RAM. Destination address d and source address s are on stack. Read 8 words from s and store them in the buffer. Then fall through to rw with destination address d still no stack.
wr
This word writes 8 18-bit words from the internal buffer into location in SRAM starting from destination address d.
288*
Multiply by 288, i.e. calculate starting address of a block b in SRAM.
8+
A factor adding 8.
fin
Final word used in all transfers sending a signal to requesting node 209.
one
This word transfers one block of data within SRAM.
copy
Copy two blocks (source and its shadow) from source block s to destination block d.
wipe
Erase content of block n.
init
Set B and jump to UP.

Description