Node 308
This node reads words from SRAM, unpacks symbols, and sends them to video buffer. It also writes content of video buffer back into SRAM. When requested by Interpreter, it makes a local copy of command line content from block 000 into its own RAM (16 words), and delivers symbols from this copy to Interpreter.
Source code
![node 308](images/node308.png)
308 unpack
16 word buffer
10 org
12/ 10 2/ 2/ 2/ 2/ 2/ 2/
6/ 12 2/ 2/ 2/ 2/ 2/ 2/
0/ 14 3F and !b ;
upck 16 @+ dup 12/ dup 6/ 0/ ;
read 19 a down a! right b! 5600 read ! ! 199 for upck next ;
write 23 a 5606 write ! ! 199 for @b ! unext ;
+buf 28 dup or dup down b! a!
1200E cmds !b 15 for @b !+ unext
syms up b! a! 15 for upck next down b! ;
err 37 n 5629 err !b !b
-buf 39 dup or a! 15 for @+ !b unext ;
start 3D !b rd-u ; 3F
init down a! right b! --l- ; 44
2 d 0 0 ether
16 word buffer
10 org
12/ 10 2/ 2/ 2/ 2/ 2/ 2/
6/ 12 2/ 2/ 2/ 2/ 2/ 2/
0/ 14 3F and !b ;
upck 16 @+ dup 12/ dup 6/ 0/ ;
read 19 a down a! right b! 5600 read ! ! 199 for upck next ;
write 23 a 5606 write ! ! 199 for @b ! unext ;
+buf 28 dup or dup down b! a!
1200E cmds !b 15 for @b !+ unext
syms up b! a! 15 for upck next down b! ;
err 37 n 5629 err !b !b
-buf 39 dup or a! 15 for @+ !b unext ;
start 3D !b rd-u ; 3F
init down a! right b! --l- ; 44
2 d 0 0 ether
Definitions
- 12/, 6/, 0/
- Extract symbols from a word and send them to where B points to.
- upck
- Read a word pointed to by A, either from SRAM (via interface node 208 if A points to DOWN) or temporary buffer (when A points to our own RAM), and send extracted symbols either to 309 or 408.
- read
- Call read in 208 with address a as parameter, read 200 words from SRAM send symbols extracted with upck to 309.
- write
- Call write in 208 with address a as parameter, and write 200 words received from 309 to SRAM at address a.
- +buf
- Set A to zero, call cmds in 208, and read first 16 words from block 0 (command line) into temporary buffer in our own RAM. Then read words from the buffer, extract symbols with upck, and send them to 408 for command line processing.
- err
- Is called when an error encountered when processing a command. Call err in 208, send position of the error n in the command line buffer, and fall throught to
- -buf
- Send the content of temporary buffer back to 208 for error processing.
- start
- Jump here when receiving a signal from 707 via ether message that the whole system is booted up. Propagate the signal to 208 and jump to RIGHT, DOWN, and UP.
- init
- Set registers A and B, and jump to LEFT waiting for a signal from 707 that the system has booted up.