             
/fcdddt  22 sept 65  part 2

lis,	lsm		/initial entry

zrt,	lac dpf		/zero drum routine return
	dac dfp

lse,	jsp lcc
	dzm mod
	dzm tas
	dzm iif
lss,	clc
	dac chi

lsp,	dzm wrd
	lac cun
ssn,	dip sgn
	dzm dnm
	dzm syl
n2,	dzm sym l
	dzm sym r
	clc
	dac let
	dac chc
	dzm fsm

lsr,	dzm bbf
	lio sk1
	dio wea
	init bax, lwt
	jsp tin		/listen
ps1,	dio chr
	law dtb		/used at tb2+2
	add chr
	dap .+1
	lac .
cas,	dio ch		/rar 9s for upper case
	and (777
	dac t2
	sub (44
	spa
	jmp ln
cad,	add (jmp uc	/first dispatch
	dap lsx
	sub ar1		/last no-eval routine
	spq
	jmp i lsx
	lac sym l
	ior sym r
	lio lcf
	sad (45
	dio iif
	law syl
	lio let
	spi i
	jsp evl
	jmp ev4
	law 77
	sad ch
	dzm tas		/cancel type-in
	lac (flex U
	jda tys
	jmp lss
                
                                
ev4,	dap sgn
	lac wrd
sgn,	0		/operator and syllable address
	dac wrd
	lio chi
	spi
	lac lwt
lsx,	jmp .


evl,	dap evx		/symbol lookup
	law evc
	dap esi+2
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
	sas evc
	jmp evg
	idx evx
ev3,	idx es4

evx,	jmp .

esn,	idx es4
	lac i ev2
	xor c4
	jmp es3
                
                                
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
	ral 2s
	add sym r
	ral 3s
	add t2
	dac sym r

	lac chc
	sub (4
	sma
	jmp lsr
	lac fsm
	ral 6s
	ior chr
	dac fsm
	jmp lsr
                
                                
uc,	lio (rar 9s	/upper case
	jmp .+2
lc,	lio ps1		/lower case
	dio cas
	jmp lsr+1

sqo,	lac dnm		/' means take decimal number
	jmp n1+1

quo,	lac fsm		/"means take as flexo codes
	jmp n1

q,	lac lwt		/Q means last quantity
	jmp n1

f,	lac mb		/F means memory bound

n1,	dzm chi
	dac syl
	jmp n2

ta0,	dzm tas
err,	lac (743521	/?
er1,	jda tys
	law 34		/black
	jda tys
	jmp lse

ser,	law 7435		/symbol table overflow error
	jda tys
	law 0772
	jda tys
	lac est
	dap sr1
sr1,	lac .
	spa
	idx sr1
	idx sr1
	lac i sr1
	jda pi
	lac (741034
	jda tys
	jmp pn2

daq,	law 7777		/>>04<< defines sym as address of Q
	and lwt
	jmp .+2

com,	lac loc		/comma defines sym as loc
	dac df1

                
                                
def,	lac let		/define symbol
sk1,	sza
	jmp err
	law pn2

de,	dap dex
	lio df1
	jsp evl
	jmp df2
	law sl
	sub est
	sma
	jmp ser		/symbol table full
	law i 1
	add est
	dap est
	dio i est
	sub one
	dap est
	lio sym r
	dio i est
	sub one
	swap
	lac sym l
	sza i
	jmp dex
	dio est
	xor c4
	dac i est
	jmp dex

df2,	dio i es4
dex,	jmp .

dot,	lio chc		/.
	lac loc
	spi i
	lac dnm
	dac syl
	law 44		/. in radix 50
	dac t2
	jmp l1

del,	dzm iif		/end of no-eval routines, delete
	jmp pn2

val,	dac df1		/open paren, sets up value for define
	jmp lss
                
                                
a,	spi		/A.acumulator
	jmp .+3
	dac ac
	jmp lse
	law ac
	jmp m1

ir,	spi		/I.io
	jmp .+3
	dac io
	jmp lse
	law io
	jmp m1

m,	spi i		/M.mask register
	jmp err
	law msk
m1,	dac iif
	jmp n1

kil,	spi
	jmp ki5
	lac let
	sza
	jmp err
lal,	lac low		/used below
	sad i est
	jmp err
	law ki1		/delete one symbol
	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 .+2
ki5,	law low		/delete all symbols
	dac est
	jmp lse
                
                                
eql,	jda eap		/print octal integer
	jda opt
pn2,	jsp lct
	jmp lss

arw,	jda eap		/print as instruction
	jda pi
ar1,	jmp del		/used by cad+2

oct,	law 10		/octal radix
	jmp .+4
dec,	spi i
	jmp uns
	law 12		/decimal radix
	dac ops
	jmp lse

smb,	spi i
	jmp sav
	law pi
	jmp .+2
cns,	law opt		/symbolic-constant switch setup
	dap pns
	jmp lse

oad,	law pvl
	jmp .+2
rad,	law pev		/octal-relative switch setup
	dap pa1
tls,	jmp lse


pls,	lac cad		/plus
	jmp ssn

min,	spi		/minus
	dio wrd
	lac csu
	jmp ssn

uni,	jmp ssn-1		/or

isc,	lac can		/and
	jmp ssn
                
                                
tab,	spi i		/tab
	jda dep
	dzm lcf

ta3,	dac lwt
	jsp lcc
	lio lcf
	sni
	jmp ta4
	sub (ac
	spa
	jmp ta0
	sub (4+nbp		/internal symbol print
	szm
	jmp ta0
	add (4+nbp
	sal 1s
	add (aa
	dap .+1
	lac .
	jda tys
	idx .-2
	xct .-3
	jda tys
	jmp .+2
ta4,	jda pad
	lio mod
	law 7221
	spi
	law 7456		/for type-in mode
	jda tys

ta5,	dzm loc
	dap loc
	lio lcf
	dio tsf

ta6,	dap tas
	jsp lct
	lac cad
	dip tas
	lac mod
	sza
	jmp lss
	jsp fet
	dac lwt
bax,	jda .		/pi, opt, or lwt
	jmp pn2

bs,	spi i		/backspace
	jda dep
	idx loc
	jmp ta3

fs,	spi i		/arrow up (forward space)
	jda dep
	law i 1
	add loc
	dap loc
	jmp ta3
                
                                
bac,	law opt		/open bracket (bar-constant)
	jmp .+2
bas,	law pi		/closed bracket (bar-symbolic)
	dap bax
	jmp bar
vb,	clc		/vertical bar
	dac mod
bar,	lac lcf		/slash
	dac tas
	lac iif
	dzm iif
	dac lcf
	sza
	dac tsf
	lac wrd
	spi i
	jmp ta5
	lac tas
	dac lcf
	lac lwt
	dzm tsf
	jmp ta6

uc8,	spi i		/> means make corr. and open register
	jda dep
	dzm tsf
	jmp ta6

cr,	spi i		/carriage return
	jda dep
	dac lwt
	law 72
	jda tys
	jmp lse+1

eas,	law ws4+2		/effective address search
	dap dpx
	law ea1
	jmp ws

nws,	lac sk2		/not word search
	dac wea

wds,	law ws1		/word search
	jmp ws


pbx,	jda eap		/print as bcd
	jda tys
	jmp pn2
                
                                
rd,	jsp zro+1	/read binary tape
	jsp soi
	jsp lct

rd1,	law 7777
	and t
	sub lo
	spa
	cla
	add lo
	dac t3
	add dfp
	lia
	law i 1
	add ch
	and (7777
	sub wrd
	sma
	cla
	add wrd
	sub t3
	spa
	jmp rd2
	add one
	dia
	lia
	lac la
	add t3
	sub t
	and (7777
	dcc
	hlt

rd2,	jsp rbk
	jmp rd1
                
                                
dr1,	spi i
	jmp dr2		/assign drum fields
	jsp lct		/type drum fields
	lac dfd
	ral 6s
	jda opt
	lac (flex <
	jda tys
	lac dfp
	ral 6s
	jda opt
	jmp lse

bgn,	jmp bg0
xec,	jmp xe0
pra, 	jmp pr0

bk,	spi i		/B
	jmp 1bk
	clc
	dac bbf
	dac let
	law bk1
	dac syl
	dac iif
	dzm chi
	jmp lsr+1
1bk,	dac dep
	law bk1
	add c4
	dac tas
	dac tsf
	jsp dep+1
	jmp lse

ovb,	clc		/overbar
	spi
	jmp .+5
	sas bbf
	jmp err
	jsp cbp
	jmp lse
	dac wrd
	jmp l1+4

start
                
                                                                                     
