/38
     
Macro FIO-DEC part 3


/set to pick up constant

lp,	jsp evl
	law 1
	jda pi
	sad (dio cv4+ncl
	jsp tmc
	lio prs
lp1,	dio xy
	lio wrd
lp2,	dio xy
	lio sgn
lp3,	dio xy
	lio def
lp4,	dio xy
	sas (dio cv4+1
	jmp rsw
	move tt,ttt
	move ct,tct
	move qt,tqt
	move bt,tbt
	init tt,rp
	dap rt
	dap ct
	init qt,ilf
	dap bt
	jmp rsw

ttt,	0
tct,	0
tqt,	0
tbt,	0
        




























        
                                                							/39
     
/save constant and reduce level

rt,	jmp xy

rp,	jsp evl
	lac mii
	spq
	jmp rp8
	jsp co

rp5,	xct i lp3
	dac wrd
	lac i lp2
	jda ed
	lac i lp4
	dac def
	law i 1
	jda pi
	sas (dio cv4
	jmp rp3
	move ttt,tt
	move tct,ct
	move tqt,qt
	move tbt,bt
	init rt,ilf
	stf 5		/syl

rp3,	jsp rss
	lac t
	sad (55		/right paren
	jmp r
	sas (77
	jmp r2
	jmp tt

rp8,	jsp mc
	jsp dd
	jda wro
	lac (-200000
	xct i lp3
	sub (-200000
	add wro
	jda pr
	cla
	jmp rp5

pi,	0
	dap pix
	lac pi
	add lp1
	dap lp1
	add (cv2-cv1
	dap lp2
	add (cv3-cv2
	dap lp3
	add (cv4-cv3
	dap lp4
pix,	jmp xy
        





        
                                                							/40
     
/constant table search

co,	dap cox
	idx nca
	lac pss
	spq
	jmp co8
	lac def
	spq
	jsp usc
	lac con
	dap co3
	jmp co4+1

co2,	lac wrd
co3,	sad xy
	jmp co6
co4,	index co3, nco, co2
	add one
	dac nco
	add (lac-sad+1
	dac hih
	sad low
	jsp sce
	lio wrd
	dio i co3

co6,	lac co3
	sub con
	add i cn6	/cor table (first)
	and (7777
co8,	dac num
cox,	jmp xy
        






























        
                                                							/41
     
/pseudo-instruction constants

cns,	lac mii
	spq
	jsp ilf
	lac loc
cn6,	dac xy		/cor table (first)
	dac tlo
	lac nca
	add aml		/aml is "alarm location"
	dac aml
	lac pss
	spq
	jmp cn5
	init bs,cn4
	lac con
	dap cn3
	jmp cn8
cn3,	lac xy		/const. list
	dac wrd
	jmp tb4

cn4,	idx cn3
	add (sad-lac
cn8,	sas nco
	jmp cn3
	lac loc
cn7,	dac cr2		/sto cor table (second)
cn5,	lac tlo
	add nca
	dac wrd
	init bs,cn1
	jmp ba1

cn1,	init bs,rnw
	move con,nco
	dzm nca
	idx cn6
	index cn7,(dac cr2+ncn,rnw

tmc,	error alm, alh, flex tmc
        






















        
                                                							/42
     
/pseudo-instruction "dimension"

dim,	init rt, di2
	init dtb+57, di1
	init ct, rsw
	init bt, ilf
	dap qt
	init tt, rst
	jmp rsw

di1,	move sym, tcn
	szf 5
	jsp ilf
	jmp rsw

di2,	jsp evl
	spi
	jsp usp
	move tcn, sym
	move wrd, tcn
	clc
	dac let
	jsp evl
	spa
	jmp di3
	spi
	jmp mdd
	lac vct
	add vc1
	dac i ea

di4,	lac vct
	add tcn
	dac vct
	jmp rsw

di3,	spi i
	jmp mdd
	dac t3
	jsp vsm
	jmp di4

mdd,	move sym, lus
	error alu, rsw, flex mdd
        



















        
                                                							/43
     
/pseudo-instruction variables

var,	lac mii
	spa
	jmp ilf
	lac loc
	spa
	jmp ilf
	lio vai
	spi
	jmp tmv
	load vai, -0
	lio pss
	spi
	jmp vaa
	sas vc1
	jmp vld

vac,	lac vc2
	dac wrd
	jmp b5

vaa,	dac vc1
	add vct
	dac vc2
	lac aml
	add vct
	dac aml
	jmp vac
        


































        
                                                							/44
     
/read characters from flexo buffer

rch,	dap rcz
	isp fwd
	jmp rc1

rc8,	lio xy		/flx list
	dio fwb
	idx rc8
	sub rf3
	sza i
	jmp rc3
	sma
	jmp rfb		/refill buffer
	law i 3
rc4,	dac fwd


rc1,	lio fwb
	cla
	rcl 6s
	dio fwb
	dac t
	dac rcp
	sad (72		/lower case
	clf 3
	sad (74		/upper case
	stf 3
rcz,	jmp xy

rc3,	lac nfc
	jmp rc4

rcp,	0

rln,	cla cli 1-opr
	szs i 50
rlj,	jmp .
	szf i 1
	jmp .-3
	tyi
	init rlj,rl1
	jmp rfa+1

rlm,	law .
	dap rf3
	ppa
	jmp rc8

rl1,	init rlm,flx+nfw
	lio i rf3
	jmp rf6
        











        
                                                							/45
     
/refill flexo buffer

rfb,	init rc8,flx
	dap rf3
	law rf4+1

rf5,	dap rf4
rf1,	setup nfc,3
rf2,	sense 5
	jmp rln
	cks
	ril 1s
	spi i
	jmp rf2
	rrb
	rpa-i
	dio t
	rir 7s
	spi
	jmp rf2		/7th code=delete
	sense 6
	jmp rfa
	lac t
	sza i
	jmp rf2
	add (1000
	dap .+2
	law 5252
	rar		/check parity
	spa
	jmp ilp

rfa,	lio t
	cla
	rcr 6s
rf3,	lio xy		/flx list
	rcl 6s
	dio i rf3
	rcr 6s
	sad (130000	/stop code
	jmp rf6
	sad (770000	/car ret
rf4,	jmp xy		/.+1 or rf6
	count nfc,rf2
	index rf3,(lio flx+nfw-41,rf1
	law rf6
	jmp rf5

rf6,	rcl 6s
	isp nfc
	ril 6s
	isp nfc
	ril 6s
	dio i rf3
	law i 2
	sub nfc
	dac nfc
	idx rf3
	jmp rc8
        




        
                                                							/46
     
ilp,	law 7143
	jda tys
	law 4777
	jda tys
	init sov, rf2
	lio t
	hlt+clc-opr
	jmp rfa

/pseudo-instructions octal, decimal, expunge and noinput

oct,	lac (opr
	jmp dec+1
dec,	lac (add num
	dac n1
	jmp r2
noi,	clc
	dac ini
	jmp r2

xp,	lio pss
	law low
	spi
	dap low
	jmp r2

/ignore to tab or car ret

itt,	jsp rsl

itc,	clf 5
	dzm wrd
	jsp rss
	lac rcp
	jmp .+2

it1,	jsp rch
	sad (36
	jmp itx
	sas (77
	jmp it1
itx,	jmp r2
        





















        
                                                							/47
     
/feed subroutine

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


/punch routine

pnb,	0
	lio pnb
	dap pnx
	lac loc
	ppb
	ril 6s
	ppb
	ril 6s
	ppb
pnx,	jmp .

/octal print subroutine

opt,	0
	dap opx
	lio (100000
	lac opt
	clf 1
op1,	rcr 9s
	rcr 6s
	sza
	jmp op2
	law 20
op3,	swap
	szf 1
	tyo
	sad (10000
	stf 1
	cli
	sas (100000
	jmp op1
opx,	jmp xy

op2,	stf 1
	jmp op3
        















        
                                                							/48
     
/type subroutine

tys,	xx
	dap tyx
	law i 3
	dac opt

tyl,	lac tys
	and (770000
	sza i
	jmp tyc
	rcl 6s
	tyo

tyc,	lac tys
	ral 6s
	dac tys
	isp opt
	jmp tyl
tyx,	jmp .

/tab typer

tb,	dap .+3
	law char r		/tab
	jda tys
	jmp .

/permute zone bits

per,	0
	dap pex
	lac per
	cli
	rcr 6s
	sza
	jmp .-2
	dio per
	lac per
	and (202020
	ral 1s
	xor per
	xor (400000
pex,	jmp .
        



















        
                                                							/49
     
/error print routines

ust,	error alu,tb3,flex usw

usb,	error alu,b5,flex usl

usq,	error alu,rst,flex usp

uss,	error alu,s2,flex uss

usm,	jda alu
	flex usm

usc,	jda alu
	flex usc

usr,	error alu,rst,flex usr

usp,	jda alu
	flex usa

usd,	jda alu
	flex usd

uds,	dio lus
	error alu,evx,flex uds

il,	error alm,r,flex ich

ilf,	error alm,itt,flex ilf

ipi,	error alm,itc,flex ipi

mdt,	move sym,lus
	error alu,rnw,flex mdt

mdm,	error alm,dmi,flex mdm

ipa,	error alm,itt,flex ipa

ids,	dzm sym
	jda alm
	flex ids

ils,	error alm,alh,flex ils

sce,	error alm,alh,flex sce

tmp,	error alm,alh,flex tmp

vld,	error alm,rnw,flex vld

tmv,	error alm,rnw,flex tmv
        










        
                                                							/50
     
/error print routine

alu,	0
	move alu,alm
	jmp alb

alm,	0
	dzm lus
alb,	dap .+3
	lac alm
	dap sov
	lac xy
	jda tys
	jsp tb
	lac loc
	spa
	jmp al1
	jda opt
	jmp al2

al1,	lac (flex ind
	jda tys

al2,	jsp tb
	lac asi
	spa
	jmp al6
	lac asm
	jda per
	jda tys
	lac aml
	sza i
	jmp al6
	lio aml
	lac (flex +
	spi
	law char r-
	jda tys
	lac aml
	spa
	cma
	jda opt

al6,	lac api
	sza i
	jmp al9
        

















        
                                                							/51
     
al7,	jsp tb
	lac api
	jda tys
	lac syn
	jda tys
	lac lus
	sza i
	jmp al8

als,	jsp tb
	lac lus
	jda per
	jda tys

al8,	law 77		/c.r.
	jda tys
	lat
	rar 1s
	lio (-0
	sma

alh,	clc+hlt-opr
	dio pch
	jmp sov

al9,	lac lus
	sza i
	jmp al8
	jsp tb
	jmp als
        

































        
                                                							/52
     
/title punch table

ftp,	0	0	/space
	004277	400000	/1
	625151	514600	/2
	224145	453200	/3
	141211	771000	/4
	274545	453100	/5
	364545	453000	/6
	010171	050300	/7
	324545	453200	/8
	065151	513600	/9
	0	0
	0	0
	0	0
	0	0
	0	0
	0	0
	364141	413600	/zero
	402014	020100	//
	224545	453000	/s
	010177	010100	/t
	374040	403700	/u
	073060	300700	/v
	376010	603700	/w
	412214	224100	/x
	010274	020100	/y
	615141	454300	/z
	0	0
	141414	141400	/=
	0	0
	0	0
	0	0
	0	0
	0	0
	204040	403700	/j
	771014	224100	/k
	774040	404000	/l
	770214	027700	/m
	770214	207700	/n
	364141	413600	/o
	771111	110600	/p
	364151	215600	/q
	771111	314600	/r
	0	0
	0	0
	101010	101000	/-
	000041	221400	/)
	101074	101000	+
	001422	410000	/(
	0	0
	761111	117600	/a
	774545	453200	/b
	364141	412200	/c
	774141	413600	/d
	774545	414100	/e
	770505	010100	/f
	364151	513000	/g
	771010	107700	/h
	004177	410000	/i
	010300	010300	/close quotes
	000060	600000	/.
        

        
                                                							/52.1
     	030200	030200	/open quotes
        































































        
                                                							/53
     
/Indicators and variable storage

vai,	0	/variables pseudo-instruction indicator
vc1,	0	/beginning of variables
vc2,	0	/end of variables
vct,	0	/variables counter
ovb,	0	/overbar indicator, 1= on, 0= off
pss,	0	/-0 = pass 1, +1 = pass 2
npa,	0	/-0 = begin pass, +1 = continue pass
pch,	0	/-0 = do not punch, +1 = punh if pass 2
inp,	0	/-0 = suppress input routine, +1 = punch input ro     
utine
tit,	0	/-0 = suppress title, +1 = punch title
psa,	0	/end of psuedo-instruction list) at beginning
psb,	0	/end of macro-instruction list ) of pass 1
ini,	0	/aux. input routine indicator
hih,	0	/upper limit of macro instruction and constant list
nfc,	0	/test word for end of flexo word list
lus,	0	/last undefined symbol
fwd,	0	/flexo word from input tape
fwb,	0	/flexo word from list
wrd,	0	/partial sum of syllables of word
num,	0	/number = value of syllable.
sym,	0	/symbol = flexo word for symbol.
def,	0	/-0 = indefinite word, +1 = definite
chc,	0	/character count of characters in syllable
let,	0	/0 = no letters in syllable, -0 = at least one lett     
er
api,	0	/last psuedo-instruction for error stop
asi,	0	/relative location_ +0 = yes, -1 = no
asm,	0	/alarm symbol for relative location
aml,	0	/location relative to above symbol (asm)
nsm,	0	/(for establishing above symbolic relative
asa,	0	/(location from location
amn,	0	/(assignment
con,	0	/current address in constant list
nco,	0	/number of distinct constant values
nca,	0	/number of constant syllables
tlo,	0	/temporary for current location
mii,	0	/macro instruction mode indicator
mdi,	0	/define indicator
syn,	0	/second three characs of M-I name
tea,	0	/temporary subroutine exit address
scn,	0	/(temporaries
scw,	0	/(for code
tcn,	0	/(word
tcc,	0	/(subroutines
dsk,	sad xy	/dummy symbol count
dsl,	0	/temporary for dum sym count

t,	0	t1,	0	/temporary
t2,	0	t3,	0	/registers
        











        
                                                							/54
     
constants

/pseudo instruction list and macro names and definitions

psi/	law npi-3

mai/	lac npi-1

	text .repeat.	rpt
	text .charac.	ch
	text .fle xo.	fx
	text .tex  t.	txt
	text .sta rt.	sta
	text .termin.	ter
	text .define.	dfn
	text .consta.	cns
	text .oct al.	oct
	text .decima.	dec
	text .noinpu.	noi
	text .expung.	xp
	text .variab.	var
	text .dimens.	dim
npi,

dss/	1
dsm/	110000
cv1/	pdl

low/	lac low

	start ps5

        































        
                                                                                                                                                                                                                                                
53	12,77	224
53	28,77	265