                            
invisible debugger

xx=hlt
sdl=iot 3477

l=0
r=1
nbp=4

define disp low,upp
[upp-uc 44]x1000 low-uc 44
termin

define letter a,b
[b-uc 44]x1000 a
termin

out=tyo
in=tyi

define init a,b
law b
dap a
termin

define index a,b,c
idx a
sas b
jmp c
termin

define setup a,b
law i b
dac a
termin

define count a,b
isp a
jmp b
termin

define move a,b
lio a
dio b
termin

define feed a
law i a
jda fee
termin

define assign a
law a
arq
jmp bsy
termin

define dismiss a
law i a






                
                                arq
termin

define this a
a"	a
termin




























































                
                                
1637/
low,	this i	/low end initial symbol table
	this and
	this ior
	this xor
	this xct
	this jdp
	this cal
	this jda
	this lac
	this lio
	this dac
	this dap
	this dip
	this dio
	this dzm
	this adm
	this add
	this sub
	this idx
	this isp
	this sad
	this sas
	this mul
	this div
	this jmp
	this jsp
	this spq
	this szm
	this clo
	this szo
	this spi
	this sni
	this sma
	this sza
	this spa
	this szf
	this skp
	this szs
	this sft
	this ral
	this ril
	this rcl
	this sal
	this sil
	this scl
	this rar
	this rir
	this rcr
	this sar
	this sir
	this scr
	this law
	this iot
	this tyi
	this ckn
	this rrb
	this cks
	this dsc






                
                                	this asc
	this isb
	this cac
	this lsm
	this esm
	this cbs
	this dia
	this dba
	this dcc
	this dra
	this lem
	this eem
	this rbt
	this bpt
	this arq
	this dsm
	this wat
	this sdl
	this lei
	this lea
	this rer
	this nmn
	this nmf
	this ioh
	this rpa
	this rpb
	this tyo
	this ppa
	this ppb
	this dpy
	this lat
	this swp
	this lap
	this clc
	this cli
	this cla
	this cma
	this lia
	this lai
	this hlt
	this stf
	this clf
	this opr
	this nop
	this xx
	this 9s
	this 8s
	this 7s
	this 6s
	this 5s
	this 4s
	this 3s
	this 2s
	this 1s

est,	low	/end of symbol table, pointer to low end
2200,		/start of id program









                
                                
/this is the beginning of the real program

ent,	lac ids	/were we in ID?
	sza
	jmp en1	/yes
	idx ids	/we are now
	jsp bpo
	jsp gsw

en2,	and (7
	sas why	/check validity
	hlt
	add red
	dap . 1
	jmp .

red,	. 1	/constant
	jmp lse	/initial entry
	hlt
	jmp cl	/dsm issued
	jmp ii	/illegal op
	jmp cll	/call button
	jmp 1bp	/bpt given
	hlt
	hlt

en1,	law 4
	lio (tsw
	dsm
	lac why
	sad (4	/call button
	jmp lse
	jmp err	/illegal instruction in id
































                
                                
tsw,	0	/temporary state word - ac
	0	/io
	0	/pc
	0	/pf
bp,	0	/location of first breakpoint
bpn,	0	/instruction that belongs there
cn1,	0	/proceed counter for bp 1
bpl,	0	/where bpt was found
spc,	0	/running field,memory bound
why,	0
nms,	0	/switch for interpret bpt
ids,	0	/nonzero if id running
xe2,	-0	/location of last execute




















































                
                                
/set state word

ssw,	dap ssx
	lac ac
	dac tsw
	lac io
	dac tsw 1
	lac pc
	dac tsw 2
	lac fg
	dac tsw 3
	lac bk1
	dac bp
	lac bk1 nbp
	dac bpn
	law 5
	lio (tsw
	dsm
ssx,	jmp .

/get user state word

gsw,	dap gsx
	law 4
	lio (tsw
	dsm	/get the state word
	lac tsw
	dac ac
	lac tsw 1
	dac io
	lac tsw 2
	dac pc
	lac tsw 3
	dac fg
	law 37
	and spc
	ior (40	/get running field
	dap dfp
	lac spc
	ral 6s
	and (1
	dac cor 1
	rar 1s
	dip cor 1
	lac why
gsx,	jmp .



















                
                                
bpi,	lio (-0	/breakpoints in
	jmp .+2
bpo,	cli	/breakpoints out
	dap p8
	dio dff
	dap bp6
	lac bp6+2
	dac bp2+1
	law bp5
	dap dpx
	spi i
	idx dpx
bp1,	law bk1
	dap bp3
bp2,	add (nbp
	0
	lac bp3
	sad p8
	jmp bp5 1	/ignore this
bp3,	lac .
	spa
	jmp bp5+1
	dac tas
	ral 6s
	and (17
	dac ts2
bp4,	lac .
	dac dep
	jmp dp0-2
bp5,	dac i bp4
	idx bp3
	sas (lac bk1 nbp
	jmp bp2
	cla
	sad dff
bp6,	jmp .
	law x1 1
bp6+2,	dap bp4		/used as a constant above
	dzm dff
	idx dpx
	lac .
	dac bp2+1
	jmp bp1






















                
                                
so1,	rpb		/skip over input routine
soi,	rpb		/enter here
	spi i
	jmp so1

rbk,	dap rbx		/read a block into buffer
	law buf
	dac rb1
	dac la
	dzm chi
	rpb
	dio t2
	dio t
	spi
	jmp ls2	/start block
	rpb
	dio ch

	law i 1		/check for block format
	add ch
	sub t2
	and (777700
	sza
	jmp err
	law i 1
	add ch
	xor t2
	and (770000
	sza
	jmp err

rb0,	rpb
	dio i rb1
	lac i rb1
	adm chi
	idx rb1
	index t2,ch,rb0
	add chi
	add t
	rpb
	dio chi
	sas chi
	jmp cse
	lio t
	ril 1s
	cla
	spi
	dip t
	spi
	dip ch
rbx,	jmp .

rb1,	0












                
                                
bsy,	jsp lct
	lac (356224
	jda tys
	lac (223034
	jda tys
	jmp pn2

cor,	/core allocation table

dfp,	0	/running field
	0
	0
	0
	0
	0
	0
	0

aa,	746100	0	/A
	747100	0	/I
	742700	0	/X
	746700	0	/G
	746600	0	/F
	744400	0	/M
	744454	007201	/M+1
	744454	007202	/M+2
	746200	0	/B
b=1
repeat nbp-1,746254	7200 b	b=b 1

ac,	0		/Internal registers.
io,	0
xrg,	7775
pc,	0
fg,	0
msk,	-0
ll,	0
ul,	7777
bk1,repeat nbp,-0
nir=.-ac

.+nbp/























                
                                
pr0,	lac bkf
	xor pc
	and (177777
	sza	/proceed from bpt?
	jmp p1 2	/no
	init p8,bk1
p8,	lac .
	sad bpl	/one still there?
	jmp p9	/yes
	index p8,(lac bk1 nbp,p8
	jmp p1 2

p9,	lio (-0	/must interpret bpt
	jsp bpi 4
	law 1
	dac nms
	jmp p2

p1,	clc	/start user
	dac xe2
	jsp bpi
	dzm nms
	lac (add
	dac cn1
p2,	jsp lcc
	jsp ssw
	dzm ids
	lac nms
	dsm	/go

xe0,	law xrg
	spi
	jmp n0
	move pc,opc
	move bkf,obf
	lac xrg
	xct xsw
	dac fa
	law 7
	dip fa
	and lc2
	sas lc2
	jmp err
	rar 6s
	ior fa
	dac xe2	/execute address
	xor pc
	and (177777
	xor pc	/save overflow,extend
	dac pc
	ior (add
	dac tas
	ral 6s
	and (17
	dac ts2
	dzm tsp
	jda trc
	xct pvs
	jmp xc	/in core






                
                                	move wrd,x1
	lac xe2
	dap pvp
	lio pvp
	dia
	lio (3
	law x1
	dcc
	jmp dre
	jmp p1 2

x1,	0	/word to be executed
	bpt
	bpt

xc,	lac wrd
	jda dep
	idx tas
	lac x1 1
	jda dep
	idx tas
	jsp dep 1
	jmp p1 2

1bp,	lac xe2	/breakpoint
	sad (-0	/X in progress?
	jmp 2b	/no
	xor pc
	and (jda
	sza
	jmp 2b	/returned to wrong core
	lac pc
	and (177777
	sub xe2
	spa
	add (i
	sad (1
	jmp cl	/returned,no skip
	sas (2
	jmp 2b	/incorrect return
	jsp lcc	/skipped
	jmp cl

2b,	lac bpl
	b=0
repeat nbp-1,sad bk1 b	jmp 3b	b=b 1
	sas bk1 b
	jmp ii	/bpt not assigned
3b,	law 7255
	dac lwt
	move pc,bkf
	jmp pb

cll,	lio (7255	/call button
	jmp . 2

ii,	lio (741010	/illegal instruction
	clc
	dac bkf







                
                                3bp,	dio lwt
	lac xe2
	sad (-0
	jmp pb	/X not in progress
	xor pc
	and (177777
	sza
	jmp pb
	law 7427	/this was an X
	jda tys
	lac lwt
	jda tys
	jsp lct
	lac xe2
	ior (add
	dac tas
	ral 6s
	and (17
	dac ts2
	dzm tsp
	jsp fet
	jda lwt

cl,	move obf,bkf	/dsm
	lac opc
	xor pc
	and (177777
	xor pc
	dac pc
	clc
	dac opc
	dac obf
	jmp lse
ff,	lac iif
	sza
	jmp err
	lac sym l
	sza i
	lac sym r
	jdp spv
	lio let
	law syl
	spi i
	law tys
	dap sgn
	lac wrd
	xct sgn
	dac ids
	jsp ssw
	jsp lcc
	lio fa
	xct xsw
	cli
	lac ids
	arq
	jda ff2
	dac ff2
	jsp lcc
ff3,	jsp gsw
	lac ff2






                
                                	sad ids
	jmp lse
	ral 6s
	jda opt
	jmp lse
ff2,	0
	jmp ff3

start

























































                
                                
ddt part 2

lis,	dismiss 47
ls2,	dismiss 51

lse,	jsp lcc
	lem
	lac (in
	dac ps1-1
	law 23	/restore sym tab
	dac low
lsa,	dzm mod
	dzm tas
lss,	dzm iif
	cla
	dap xsw		/clear < switch
	clc
	dac chi
	dzm wrd
	lac lwt
	dac df1
	lac cun
ssn,	dip sgn
	dzm dnm
	dzm syl
n2,	dzm sym l
	dzm sym r
	clc
	dac let
	dac chc

lsr,	move sk1,wea
	init bax,lwt
	xx
ps1,	dio ch
	law dtb
	add ch
	dap .+1
	lac .
cas,	rar 9s	/case shift
	and (777
	dac t2
	sub (44
	spa
	jmp ln
cad,	add (jmp uc	/used as add
	dap lsx
	sub ar1	/last no-eval routine
	spq
	jmp i lsx
	lac sym l
	ior sym r
	lio lcp
	sad (45
	dio iif
	law syl
	lio let
	spi i
	jsp evl






                
                                	jmp ev4
	law 77
	sad ch
	dzm tas
	lac (flexo U
	jda tys
	jmp lss



























































                
                                
evl,	dap evx	/symbol lookup
	law evc
	dap esk
evc,	lac est
	dap es4

evg,	dap ev2
ev2,	lac .
	spa
	jmp esn
	cla
es3,	sas sym l
	jmp esi
es4,	lac .
	sad sym r
	jmp ev3
esi,	idx es4
	idx es4
esk,	sas evc
	jmp evg
	idx evx
ev3,	idx es4
evx,	jmp .
esn,	idx es4
	lac i ev2
	xor (add
	jmp es3






































                
                                
ev4,	dap sgn
	lac lsx
	sub cbr
	spa
	jmp . 4
	lac iif
	sza
	jmp err
	lac wrd
sgn,	0	/opr and syl addr
	dac wrd
	dac df1
	lio chi
	spi
	lac lwt
lsx,	jmp .

n,	rir 5s		/number routine
	lac syl
	ral 3s
	spi i
cun,	ior t2
	dac syl
	lac dnm
	ral 2s
	add dnm
	ral 1s
	spi i
	add t2
	dac dnm
	jmp l1
ln,	add (44-12
	spa
	jmp n

	dzm let		/letter routine
l1,	dzm chi
	idx t2
	idx chc
	sas (4
	jmp ln3
	lio sym r
	dio sym l
	dzm sym r
ln3,	sub (6
	szm
	jmp lsr
	lac sym r
	mul (50
	div (1
	jmp .
	add t2
	dac sym r
	jmp lsr











                
                                
/no-eval routines

uc,n 44,	lio (rar 9s		/upper case
	jmp .+>>12<<glc,	lio ps1		/lower case
	dio cas
	jmp lsr

sqo,	lac sym r		/'
	jmp n1

quo,	lac sym l		/"
	sza i
	lac sym r
	jdp spv
	lac tys
	jmp n1

q,	lac lwt		/Q
	jmp n1

f,	lio chi		/F
	spi i
	jmp ff
	law fg

n0,	lio iif
	sni i
	jmp err
	dac iif

n1,	dzm chi
	dac syl

	jmp n2






























                
                                
daq,	lac df1		/>>04<<
	jmp def-2

com,	lac lcp
	sza
	jmp err
	lac loc
	and (7777
	dac df1
























































                
                                
def,	lac let		/),define
	ior iif
sk1,	sza
	jmp err
	law pn2

de,	dap dex
	lio df1
	jsp evl
	jmp df2
	law 202
	sub est
	sma
	jmp ser	/overflow
	law i 1
	adm est
	dio i est
	sub (1
	dap est
	lio sym r
	dio i est
	sub (1
	swp
	lac sym l
	sza i
	jmp dex
	dio est
	xor (add
	dac i est
	jmp dex

df2,	dio i es4
dex,	jmp .
dot,	lio chc		/.
	law 7777
can,	and loc
	spi i
	lac dnm
	dac syl
	law 44
	dac t2
	jmp l1
del,	jmp pn2		/x

/eval routines permitting A,I, etc.

pls,	lac cad		/+,space
	jmp ssn

min,	spi		/-
	dio wrd
	lac csu
	jmp ssn

ovb,	clc		/.
	spi
	jmp n1
	lac iif
	sas (bk1






                
                                	jmp ov2
	clc	/B.
	b=0
	repeat nbp,dac bk1 b	b=b 1
	jmp lse

ov2,	sas (msk
	jmp err
	clc	/M.
	dac msk
	dzm ll
	law 7777
	dac ul
	jmp lse

bac,	law opt		/[
	jmp . 2
bas,	law pi		/]
	dap bax
	jmp bar
vb,	law ta5		/|
	jmp bar 1
lpr,	clc		/(
	dac mod
bar,	law ta5 4		/slash
	dap br2
	spi i
br2,	jmp .
	lac lc2
	dac ts2
	law ta6-ta5
	adm br2
cbr,	jmp br2

































                
                                
/other eval routines

kil,	spi i		/K
	jmp ki5
	law low
ki6,	dac est
	jmp lse


























































                
                                

prc,	lac lc2
eql,	jdp eap		/=
	jda opt
pn2,	jsp lct
	jmp lss

pbx,	jdp eap		/~
	jda tys
	jmp pn2

arw,	jdp eap		/.
	jda pi
ar1,	jmp del	/used by cad 2

oct,	spi i		/H
	jmp hoa
	law 10
	jmp .+4
dec,	spi i		/U
	jmp uns
	law 12
	dap ops
	jmp lse

smb,	spi i		/S
	jmp sav
	law pi
	jmp .+2
cns,	law opt		/C
	dap pns
	jmp lse

oad,	law pvl		/O
	jmp tls-1
rad,	spi i		/R
	jmp rea
	law pev
	dap pa1
tls,	jmp lse

err,	lac (743521
	jda tys
	law 7234
	jda tys
	jmp ls2


a,	law ac		/A
	spi
	jmp n0
	lac wrd
	dac ac
	jmp lse

ir,	law io		/I
	spi
	jmp n0
	lac wrd






                
                                	dac io
	jmp lse

m,	law msk		/M
	spi
	jmp n0
	lac wrd
xsw,	skp
	jmp am
	dap ul
	lac fa
	dap ll
	lac ul
	sub ll
	spa
	jmp err
	jmp lse
am,	dac msk
	jmp lse

bk,	law bk1		/B
	spi
	jmp n0
	add (add
	dac tas
	dac tsp
	lac wrd
	jda dep
	jmp lse

uni,	jmp ssn-1		/>>05<<

isc,	lac can		/^
	jmp ssn

ndb,	spi		/.
	jmp prc
	dac lwt
	and (-177
	sza i
	jmp . 4
	and (jda
	ral 6s
	jmp . 2
	lac lwt
	dac lc2
	jda trc
	jmp lse


















                
                                
tab,	spi i		/tab
	jda dep
	dzm lcp
ta3,	dac wrd
	jsp lcc
	lac wrd
	lio lcp
	sni
	jmp ta4
	and (7777	/internal
	sub (ac
	spa
	jmp err
	sub (nir
	sma
	jmp err
	add (nir
	sal 1s
	add (aa
	dap .+1
	lac .
	jda tys
	idx .-2
	xct .-3
	jda tys
	jmp ta4+1
bs,	spi i		/backspace
	jda dep
	law 1
	add loc
	jmp ta3


































                
                                
fs,	spi i		/^
	jda dep
	law i 1
	jmp bs 3

uc8,	spi i		/>
	jda dep
	lio lc2
	dio ts2
	jmp ta6 5

cr,	spi i		/c.r.
	jda dep
	dac lwt
	law 72
	jda tys
	jmp lse+1

eas,	clc		/E
	dac dff
	init dpx,eag
	law ea1
	jmp ws

nws,	lac sk2		/N
	dac wea

wds,	law ws1		/W
	jmp ws




































                
                                
bgn,	law pc		/G
	spi
	jmp n0
	law 7	/go
	and lc2
	sas lc2
	jmp err
	dac ts2
	rar 6s
	xor pc
	and (jda
	xor pc
	dac pc
	lac wrd
	dap pc
	lac ts2
	jda trc
	clc
	dac opc	/save bad pc
	jmp p1

xec,	jmp xe0		/X

pra,	spi		/P
	cla
	cma
	add (add
	dac cn1
	lac (jda
	and pc
	ral 6s
	jda trc
	jmp pr0
































                
                                
ttl,	spi i		/L
	jmp err
	jmp tp0

jbk,	spi		/J
	jmp err
	assign 47
	lac wrd
	ior (jmp
	dac lwt
	feed 40
	lac lwt
	jdp pbw
	feed 520
	jmp lis


















































                
                                
pul,	spi		/<
	jmp err
	dac fa
	law 72
	jda tys
	law 600
	jmp lss 2

pwd,	dac dep		/_
	lac tas
	sma
	jmp err
	lac tsp
	spi
	ior mod
	sza
	jmp err
	spi
	jmp .+3
	jsp dep+1
	dac lwt
	lac tas
	dac fa
	dac la
	jmp pdt

pun,	move lc2,ts2	/D
	lio chi
	xct xsw
	spi	/D or aD
	jmp pd2	/a<bD or D
	move ll,fa	/aD
	move ul,la
	and (17
	jmp pd3






























                
                                
rd,	law yn1		/Y
cvy,	dap vyx
	lac wrd
	spi i
	jmp vy1 1
	xct xsw
	jmp vy1
	jmp err

vfy,	jsp cvy		/V
	jsp lcc
	lio (i
	law i 7777
	and t
	sas chc	/same core as last block?
	dio pvf	/no
	dac chc
	lac t
	dap fa
vf1,	jsp pv
	dac ch
	sad i la
	jmp vf7
	law i 7777
	and t
	xct xsw
	lac syl
	dac lc2
	lac fa
	dap loc
	jda pad
	law 2136
	jda tys
	lac ch
	jda lwt
	jsp lct
	lac i la
	jda lwt
	jsp lcc
vf7,	idx fa
	index la,rb1,vf1
	jmp nb

zro,	xct xsw		/Z
	spi
	jmp zr2
	move ll,fa
	move ul,la
	jmp zr3
















                
                                
/last dispatched routine

tbl,	spi i	/T
	jmp tb1	/argument before T
	jsp lct
	assign 51
	law flexo  ok
	jda tys
	lac (jmp tba
	dac ps1-1
tbe,	law 0
	dap tbb
	dap tbc
	jmp lsa

tig,	jdp rpr
	sas (77
	jmp tig
tba,	jdp rpr
	sad (21
	jmp tig
	sas (33
	sad (36
	jmp tbb
	sad (77
	jmp tbb
	law 600
	dap tbb
	jmp ps1

tbb,	skp
	jmp tba	/ignore redundant separators
tbc,	skp i
	jmp tbd	/define
	lac sym	/save sym
	dac sys
	lio sym+1
	dio sys+1
	sas (134773	/compare with start
	cli
	lai
	sad (2176
	jmp ls2	/done
	law 0
	dap tbb
	law 600
	jmp tbe+2

tbd,	lac sys	/get saved symbol
	dac sym
	lio sys+1
	dio sym+1
	ior sym+1
	sza i
	jmp err	/no symbol
	lac syl
	dac df1	/value
	jsp de
	jmp tbe






                
                                
rpr,	0
	rpa
	sni
	jmp rpr+1
	law 2125
	rcr 7s
	spa
	jmp rpr+1
	rcr 1s
	ral 8s
	dap .+1
	ril
	spi i
	jmp err
	and (77
	lia
	jmp i rpr
















































                
                                
pot,	sas (2
	jmp err		/not possible
	dzm sym l
	law 6
	dac fa
	law 200
	dac wc
	cla
	jda trc
	lac (i
	dac pvf
	jsp pv
	sal 1s
	spq
	jmp err
	dac opt	/twice number of symbols
	idx fa
	jsp pv
	dac fa	/origin
	add opt
	dac la	/end test
	and (7777
	sas la
	jmp err
gfd,	jsp pv
	and (177777
	dac sym r
	idx fa
	jsp pv
	dac df1
	lio sym r
	sni i
	jsp de
	index fa,la,gfd
	jmp lse






























                
                                
tb1,	sas (1
	jmp pot	/not 1T
	jsp ar	/1T
tb3,	jsp gwd
	dac sym l
	jsp gwd
	and (177777
	dac sym r
	ior sym l
	sza i
	jmp ls2	/finished
	jsp gwd
	dac df1
	lac sym l
	lia
	ril 1s	/macro definition zone bit
	sma>>05<<spi
	jmp tb3
	and (177777
	dac sym l
	jsp de	/define
	jmp tb3

gwd,	dap gwx
	lac la
	sas rb1
	jmp gw1
	jsp rbk
	jmp gwd+1
gw1,	dap gwa
	idx la
gwa,	lac .
gwx,	jmp .
































                
                                
ki5,	lac let
	sza
	jmp err
lal,	lac low
	sad i est
	jmp err
	law ki1
	dap evx
	law lal
	jmp evl 2
ki1,	jmp .+2
	jmp err
	sub ev2
	dac t3
	idx t3
	dac t4
	idx t4
	idx es4
	and (7777
ki2,	sub t4
	dap ki3
	add t3
	dap ki4
ki3,	lio .
ki4,	dio .
	sas est
	jmp ki2
	add t3
	jmp ki6

eap,	0		/eql,arw,pbx common
	dac lwt
	jsp lct
	jmp i eap

start





























                
                                
ddt part 3

pb,	lac pc	/entry from user program
	dac wrd
	ral 6s
	and (17
	dac lc2
	dzm mod
	dzm lcp
	lac wrd
	jda pad
	lac lwt
	jmp ta4 5

ta4,	jda pad
	lio mod
	law 7221
	spi
	law 7257	/for type-in mode
ta4 5,	jda tys
	lio lcp
	jmp ta5 6

ta5,	lac wrd
	and (jda
	ral 6s
	dac lc2
ta5 4,	lio iif
	dio lcp
ta5 6,	dio tsp
	lio lc2
	dio ts2
	lac wrd
	dap loc
ta9,	ior (add
	dac tas
	dzm iif
	jsp lct
	lac mod
	sza
	jmp lss
	jsp fet
	dac lwt
bax,	jda lwt	/pi,opt,or lwt
	jmp pn2

ta6,	lac lwt
	and (jda
	ral 6s
	dac ts2
ta6 4,	lac lwt
ta6 5,	dzm tsp
	jmp ta9












                
                                
dre,	lac (723564	/drum error
	jda tys
	law 6534
	jda tys
	jmp lis

ar,	dap arx
	assign 51
	jsp lct
	jsp soi
	law flexo  ok
	jda tys
	jsp lct
arx,	jmp .

ser,	law 7435		/symbol table overflow error
	jda tys
	law 0772
	jda tys
	lac est
	dap sr1
	lio i sr1
	spi
	idx sr1
sr1,	lac
	dac sym r
	spi i
	cli
	dio sym l
	jsp spt
	lac (741034
	jda tys
	jmp ls2
































                
                                
cse,	lac (356342	/checksum
	jda tys
	lac (224434
	jda tys
	jsp lct
	in
	lai
	sas (charac rc	/type "c" to continue
	jmp ls2
	assign 51
	jsp lct
	jmp rbk+1





















































                
                                
/dispatch table - lc,uc

dtb,	disp pls,pls		/space
	letter 1,quo		/1,"
	letter 2,sqo		/2,'
	letter 3,pbx		/3,~
	letter 4,daq		/4,>>04<<
	letter 5,uni		/5,>>05<<
	letter 6,isc		/6,^
	letter 7,pul		/7,<
	letter 10,uc8		/8,>
	letter 11,fs		/9,^
	disp err,err
	disp err,err
	disp err,err
	disp err,err
	disp err,err
	disp err,err
	letter 0,arw		/0,.
	disp bar,err		//,?
	letter 34,smb		/s
	letter 35,tbl		/t
	letter 36,dec		/u
	letter 37,vfy		/v
	letter 40,wds		/w
	letter 41,xec		/x
	letter 42,rd		/y
	letter 43,zro		/z
	disp err,err
	disp com,eql		/,,=
	disp err,err
	disp err,err
	disp tab,tab		/tab
	disp err,err
	disp pwd,ndb		/_ ,.
	letter 23,jbk		/j
	letter 24,kil		/k
	letter 25,ttl		/l
	letter 26,m		/m
	letter 27,nws		/n
	letter 30,oad		/o
	letter 31,pra		/p
	letter 32,q		/q
	letter 33,rad		/r
	disp err,err
	disp err,err
	disp min,pls		/-,+
	disp def,bas		/),]
	disp ovb,vb		/. ,|
	disp lpr,bac		/(,[
	disp err,err
	letter 12,a		/a
	letter 13,bk		/b
	letter 14,cns		/c
	letter 15,pun		/d
	letter 16,eas		/e
	letter 17,f		/f
	letter 20,bgn		/g
	letter 21,oct		/h






                
                                	letter 22,ir		/i
	disp lc,lc		/lower case
	disp dot,del		/.,x
	disp uc,uc		/upper case
	disp bs,bs		/backspace
	disp err,err
	disp cr,cr		/car. ret.



























































                
                                
fee,t2,	0		/feed
	dap fex
	cli
	ppa
	isp fee
	jmp .-2
fex,	jmp .

lwt,	0	/last word typed
	dap pnx
	lac lwt
pns,	jda pi	/pi or opt
pnx,	jmp .

pi,t4,	0		/print instruction
	dap px
	jsp pev
	lac pi
	sub (i
	spa
	jmp ppk
	dac pi
	law 72
	jda tys
	out
	law 71
	jda tys

ppk,	cli
	out
	xct ea 1
	jmp pvl
	law 72
	jda tys
	and (opr
	sad (sft
	jmp i66
	sad clw
	jmp plo
	rar 1s
	sza
csu,	sub (320000	/used as sub
	spa
	jmp plo
pvl,	lac pi
	sza i
	szf 1 i
pv3,	jda opt
px,	jmp .

plo,	jsp pev
	jmp pa1+1













                
                                
i66,	law 1		/1s-9s
	add pi
	and pi
	sza
	jmp pvl
	law pa1+1
	dap pex
	lac ea
	jmp eak+2

pad,	0		/print address
	dap px
	lac lc2
	sza i
	jmp . 4
	jda opt	/other than core 0
	cli
	out
	law 7777
	and pad
	dac pi
	clf 1
pa1,	jsp pev		/pev or pvl
	lac (flexo +
	jda tys
	jmp pvl

pev,	dap pex		/symbol lookup subr
	law i 7777
	and pi
	sad (opr		/detect operates
	jmp sev
	and (760000
	sad (skp		/detect skips
	jmp sev
eak,	dap ea 1
	lac est
	dap ea
	clf 1


























                
                                
eal,	lio i ea
	spi
	idx ea
	dap psw
	spi i
	cli
	dio t3
	idx ea
ea,	lac .
	skp i	/test for skip or operate
	jmp sko
	xor pi
	spa
	jmp eix
	lac pi
	sub i ea
	spa
	jmp eix
	szf i 1
	jmp psw
	lac i ea
	sub i ei1
	szm
	jmp psw

eix,	idx ea
	sad evc
	jmp .+3
	sas (lac est-22
	jmp eal
	xct ea 1
	jmp pex
	szf i 1
	jmp pvl
	lac pi
ei1,	sub
	lia
	sza		/detect neg nums
	jmp i77
	dio pi
eiy,	jsp spt
	lac pi
sk2,	sza i
	jmp px
	xct ea 1
	jmp . 2

pex,	jmp .
	cma
	dac t2		/mask
	jmp eix

sev,	dac t1		/save instruction
	lac pi
	cma
	dac t2		/mask
	law 600
	jmp eak







                
                                
sko,	ior t1
	sas i ea
	jmp eix
	szf 1
	xor t1
	sza i
	jmp eix
	xor pi
	lia
	and t2
	sza
	jmp eix
	dio pi
	szf i 1
	jmp psw
	lac (flexo >>05<<
	jda tys

psw,	lac .		/best symbol thus far
	dac sym r
	lio t3
	dio sym l
	lac ea
	dap ei1
	stf 1
	xct ea 1
	jmp eiy
	jmp eix

i77,	law i 7777		/numbers 77xxxx
	and pi
	sas (770000
	jmp eiy-1
	law 7254
	jda tys
	lac pi
	cma
	jmp pv3

/assorted type-out routines

tys,	0
	dap tyx
	setup opt,3
tyl,	lac tys
	ral 6s
	dac tys
	and (77
	sza i
	jmp tyc
	lia
	sad (72
	jmp dns
	sad (74
	jmp ups
tyb,	out
tyc,	count opt,tyl
	lac lwt
	cli






                
                                tyx,	jmp .

dns,	lac ps1
dn1,	sad cas
	jmp tyc
	dac cas
	jmp tyb

ups,	lac (rar 9s
	jmp dn1

lcc,	dap lcx		/lower case, carriage return
	law 7277
	jmp lc1

lct,	dap lcx		/lower case, tab
	law 7236
lc1,	jda tys
lcx,	jmp .

/numeric print

opt,	0
	dap opx
	dzm op1
opa,	lac opt
opb,	dac op2
	cli>>05<<swp
	rcl 20
	div ops
ops,	10
	sas op1
	jmp opb
	sni
	lio ops-2
	out
	lac op2
	dac op1
	sas opt
	jmp opa
opx,	jmp .

/symbol print subroutine

spt,	dap spy
	lac sym l
	jdp spv
	jsp tys 1
	lac sym r
	jdp spv
	jsp tys 1
spy,	jmp .

spv,	0
	and (177777
	dzm tys
	mul (1
	div . 1
	50
	dio . 3






                
                                	mul (1
	div .-3
	0
	jdp cv1
	jdp cv1
	lac .-3
	jdp cv1
	jmp i spv

cv1,	0
	dio op1
	sza i
	jmp cvx
	add (7
	dac opt
	sar 3s
	cma
	add opt
	sar 3s
	add (cvo
	dap . 1
	lac .
	add opt
	lio tys
	rar 6s
	rcl 6s
	dio tys
cvx,	lac op1
	jmp i cv1

cvo,	10	-10	37	6	-22



































                
                                
trc,	0	/translate core
	dap gex
	cli
	law 77
	and trc
	sas trc
	jmp ge2	/drum field
	and (7
	sas trc
	jmp err
	add (cor
	dap . 1
	lac .
	lia
	sza i
	jmp err
ge2,	rar 6s
	dac pvp
	ral 6s
	law 0
	dap pvp
	spi
	jmp gex-1
	lac (370000
	and pvp
	sza i
	jmp err
	sub (270000
	sma
	jmp err
	law 600
	dap pvs
gex,	jmp .

ck1,	move ll,fa
	move ul,la
ckl,	move lc2,syl
ck2,	dap clx	/set up pv for punch or search
	move est,wc
	cla
	dip fa
	dip la
	lac la
	sub fa
	spa
	jmp err
	idx la
	lac (i
	dac pvf
	lac syl
	jda trc
clx,	jmp .

/searches

ws,	dap wsf	/word search
	spi
	jmp err
	jsp ck1






                
                                	jsp lcc
wsl,	jsp pv	/get word
	dac chc
wsf,	jmp .
ws1,	xor wrd	/W,N
	and msk
wea,	skp .
	jmp wst	/no
	lac fa
	dap loc
	jda pad
	law 2136
	jda tys
	lac chc
	jda lwt
	jsp lcc
wst,	index fa,la,wsl
	jmp lse

ea1,	dac t2	/E
	dzm opt
	and (760000
	sad (cal
	jmp ea2
	rar 1s
	sub (320000
	sma
	jmp wst
ea3,	lac t2
	ral 5s
	sma
	jmp ea2
	law 7777
	and t2
	dap tas
	xct pvs
	jmp ea5	/using core
	sub pvf
	spa
	jmp ea5	/not in buffer
	dap pv4
	sub est
	sma
	jmp ea5
	xct pv4
eag,	dac t2
	lac pc
	ral 1s
	spa
	jmp ea2	/extend mode
	idx opt
	sas (10
	jmp ea3
	jmp wst

ea2,	law 7777
	and t2
	jmp ws1

ea5,	cla






                
                                	dap pvp
	jmp dp0

/punching routines

pd2,	spi i
	jmp . 3
	dzm fa
	law 7777
	dac la
pdt,	law 17
	and ts2
	sas ts2
	cla	/drum
pd3,	rar 6s	/core
	dac chi
	move ts2,syl
	jsp ck2
	assign 47

pb5,	lac fa
	ior (77
	add (1
	dac t
	sub la
	sma
	jmp pb6	/last block

pb4,	jsp pbb	/pbb or pur
	jmp pb5

pb6,	lac la
	dac t
	xct pb4
	jmp pn2

pur,	dap pb2		/punch read-in mode blocks

pu2,	lac fa
	ior (dio
	jdp pbw
	jsp pv
	jdp pbw
	index fa,t,pu2
	jmp pux

pbb,	dap pb2		/punch binary block format
	dzm t2
	lac fa
	add chi
	jdp pbw
	lac t
	add chi
	jdp pbw

pb1,	jsp pv
	jdp pbw
	index fa,t,pb1
	lac t2
	jdp pbw






                
                                pux,	feed 5
pb2,	jmp .

/get word from buffer
/address in fa, field set up by trc

pv,	dap pvx
	lac fa
pvs,	skp .
	jmp pv6	/in core
	sub pvf	/on drum
	spa
	jmp pvg	/not in buffer
	dap pv4
	sub wc
	sma
	jmp pvg	/not in buffer
pv4,	lac .
pvx,	jmp .

pv6,	dap pvp
	eem
	lac i pvp
	lem
	jmp pvx
pvg,	lio fa	/read new buffer
	dio pvf
	dia
	lac wc
	dap pvp
	lio pvp
	cla
	dcc
	jmp dre
	jmp pv 1

pbw,	0	/punch binary word
	lia
repeat 3,ppb	rcl 6s
	adm t2
	jmp i pbw

























                
                                
/title punch

tp0,	assign 47
	feed 30
	jsp lcc

tp1,	tyi
	lai
	sad (77
	jmp pir
	sad (75
	jmp p22
	sas (36
	jmp tt1

pri,	law pur
	jmp pi1
pir,	feed 40
	law 7751
	dac fa
	law lod
	dap ptr
pi3,	lac fa
	ior (dio
	jdp pbw
ptr,	lac .
	jdp pbw
	idx ptr
	index fa,(7776,pi3
p22,	lac (jmp 7751
	jdp pbw
	law pbb
pi1,	dap pb4
	feed 30
	jmp lse

lod,	rpb
	dio 7755
	dio 7776
	spi
	0
	rpb
	dio 7777
	rpb
	dio i 7755
	lac i 7755
	add 7776
	dac 7776
	idx 7755
	sas 7777
	jmp 7760
	add 7776
	rpb
	dio 7776
	sas 7776
	hlt
	jmp 7751








                
                                
/title punch subroutine

tt1,	dac tt2
	sal 2s
	adm tt2
	law i 5
	dac tt3
tt4,	idx tt2
	mul tt5
	add tt6
	dap tt7
clw,	law
	rcl 2s
	add tt8
	dap . +2
tt7,	lac .
	xct .
	and tt9
	swp
	ppa
	isp tt3
	jmp tt4
	cli
	ppa
	jmp tp1








































                
                                
/title punch table

tt0,	0	0	/space,1,2
	427740	006251	515146
	224145	453214	/3,4,5
	121177	102745	454531
	364545	453001	/6,7,8
	017105	033245	454532
	065151	513600	/9
tt8,	.+1	nop	ral 6s
tt9,	rar 6s	nop
	0	0	0
	000000	000036	/0,/
	414141	364020	140201
	224545	453001	/s,t,u
	017701	013740	404037
	073060	300737	/v,w,x
	601460	374122	142241
	010274	020161	/y,z
	514145	430000	000000
	141414	141400	/=
	0	0	0
	0	0
tt3,	000000	001010	741010	/_
	204040	403777	/j,k,l
	101422	417740	404040
	770214	027777	/m,n,o
	021420	773641	414136
	771111	110636	/p,q,r
	415121	567711	113146
tt5,	125252	0
tt6,	tt0	001010	101010	/-
	004122	140000	/),| ,(
	007700	000014	224100
tt2,	000000	000076	/a,b
	111111	767745	454532
	364141	412277	/c,d,e
	414141	367745	454141
	770505	010136	/f,g,h
	415151	307710	101077
	004177	410000	/i,low,.
	000103	000000	606000
	000301	000000	/up






















                
                                
/symbol table hoard and read

hoa,	lac (i	/hoard
	xct xsw
	dac fa
	sub fa
	spa
	jmp err
	lac fa
	spq
	jmp err
	jsp ckf
	law i low 1
	add est
	add fa
	dac low
	spa
	jmp err
	dac lwt
	add wrd
	lia
	dia
	law low 1
	sub est
	lia
	lac est
	dcc
	jmp dre
	jsp lct
	lac lwt
	jda opt
	jmp lse

rea,	lac (i	/read
	xct xsw
	dac fa
	sub fa
	spa
	jmp err
	lac fa
	spq
	jmp err
	law i low 1
	add fa
	lia
	spi
	cli
	dio chi
	cma
	add chi
	dac mod
	dia
	jsp ckf
	add fa
	sub chi
	lia
	law low
	dac est
	lac mod






                
                                	dcc
	jmp dre
	law low 1
	add low
	sub fa
	dac tas
	sub (low
	szm
	jmp err
	law i 200
	add mod
	spa
	cla
	add (200
	sub tas
	szm
	jmp err
/test new table
	lac tas
	dap re9
re5,	sad (low
	jmp re9
	sub (low
	sma
	jmp err
	lac i tas
	ral 1s
	spa
	jmp err
	rar 1s
	sma
	jmp re8
	idx tas
	lac i tas
	and (jmp
	sza
	jmp err
re8,	idx tas
	idx tas
	jmp re5
re9,	law .
	jmp ki6

start






















                
                           h
