t[1-7].s: annotate TMG sources (all start with one or more tabs and ") (#230)

start of TMG resurrection attempt
This commit is contained in:
Phil Budne
2021-08-21 12:46:06 -04:00
committed by GitHub
parent 8d6ea663ff
commit b7733dafea
7 changed files with 770 additions and 677 deletions
+30 -23
View File
@@ -1,4 +1,10 @@
"** 13-120-147.pdf page 5
" TMG
" console switches:
" bit 0: do not save/dump core!!
" bit 15: trace first recognition or generate instruction & halt
" bit 16: trace all generation instructions
" bit 17: trace all recognition instructions
t=0
main:
lac 017777 i
@@ -23,16 +29,16 @@ main:
jms advance; jmp 1f
jmp rinterp
0:lac 2f
jms obuild
1:lac owrite
spa
jmp 0b
jms oflush
las
spa
sys exit
sys save
0:lac 2f " get EOS
jms obuild " add to obuf
1:lac owrite " here on retreat
spa " anything in obuf?
jmp 0b " no, put EOS
jms oflush " flush buffered output
las " get switches
spa " high bit set?
sys exit " yes: exit
sys save " no, dump core!!!!
2:o777
@@ -40,22 +46,23 @@ main:
"puts out and octal strin g from symtab entry
symoct:
symoct: " BUILTIN: (output last symtab ent in octal?)
lac equ
add equbot
dac 9f+t
lac 1f
jms twoktab; lac 9f+t i
1:gf .+1 x
lac ii
dac 8
lac 8 i
add symbot
dac 9f+t
dac 9f+t " save temp pointer
lac 1f " fetch "gf" (execute native code) inst below
jms twoktab; lac 9f+t i " second word is contents of word *temp
" first word of "two word ktab" entry:
1:gf .+1 x " invoke native code (below), and exit
lac ii " fetch instruction pointer
dac 8 " save in auto-increment register 8
lac 8 i " fetch word after *ii
add symbot " use as offset into symtab
dac 9f+t " save in temp
2:lac 9f+t i
jms putoct
lac onenl
2:lac 9f+t i " fetch symtab word *temp
jms putoct " output octal
lac onenl " output newline
jms obuild
lac 9f+t i
and o600600