Node 110
This node passes commands from 11 to 211. It also performs tasks related to calls to editor executor in node 409 and deleting whole words.
Source code
110 pass
upd 00 12022 upd ! ;
aim 02 1200E aim ! ;
bsp 04 12029 bsp ! ;
ins 06 c 5618 ins ! ! ;
xqt 08 12013 xqt @p @p . @p !b . . 12165 --lu , ! ! ! @ !b ;
seq 0E p-n dup 2/ 2/ dup 2* . + push 3 and pop . + ;
del 13 p1 seq @b if seq n1n2 over dup @p . @p . . .
! ! 5634 del ! - . + ! then ;
start 1D @ !b rd-- ; 1F
init up a! 195 rd-- b! start ; 23
5 d 1 r 0 ether
upd 00 12022 upd ! ;
aim 02 1200E aim ! ;
bsp 04 12029 bsp ! ;
ins 06 c 5618 ins ! ! ;
xqt 08 12013 xqt @p @p . @p !b . . 12165 --lu , ! ! ! @ !b ;
seq 0E p-n dup 2/ 2/ dup 2* . + push 3 and pop . + ;
del 13 p1 seq @b if seq n1n2 over dup @p . @p . . .
! ! 5634 del ! - . + ! then ;
start 1D @ !b rd-- ; 1F
init up a! 195 rd-- b! start ; 23
5 d 1 r 0 ether
Definitions
- upd
- Call upd in 210.
- aim
- Call aim in 210.
- bsp
- Call bsp in 210.
- ins
- Send character c and call ins in 210.
- xqt
- Let 210 execute from LEFT and UP, then build a bridge to 209 and call xqt there. Wait for reply and send it back to 10.
- seq
- Calculate sequence number n from pointer p.
- del
- Given pointer p1 before the deleted word, calculate its sequence number n1, read pointer after the deleted word p2 and if non-zero, calculate its sequence number n2. Then duplicate n1 and send it to 210 as a new pointer position (expressed as a sequence number). Then send n2-n1 i.e. the length of deleted word to stack of 210, call del there and return.
- start
- Wait for signal from 210, pass it to 10 and jump to RIGHT and DOWN ports.
- init
- Set registers A and B, and jump to start.