                                 
midas symbol package_. extended memory

/symbol punch

putdrum

fr1/

py,	cbs
	rrb
	lio .+1
	dio 91r
	dio 91p
	lac 92p
	dac 93p
	lac 92r
	dac 93r
	szs i 10
	jmp pyx
	lac (pd2+1
	sas sbp
	hlt
	dac sbp
	jsp svr
	 pss
	 pch
	 org
	 loc
	 rli
	 rim
	 rlp
	 jmp py1
py1,	dzm rim
	dzm rli
	dzm rlp
	dzm t2
	law 1
	dac pss
	dac pch
	law i 30
	jda fee

py2lc,	clf 6
py2,	listen
	swap
	sad (74
	jmp py2uc
	sad (72
	jmp py2lc
	sad (77
	jmp pyc
	sad (36
	jmp pyt
	dac lsc
	jsp ptb
	jmp py2

py2uc,	stf 6
	jmp py2
          
                                                                 
pyt,	listen		/get control character
	law i 1
	swap
	sad (77
	jmp pyc
	sad (char rs
	jmp pys
	lio one
	sas (char rm
	jmp pyt
pys,	dio t2
	law fee
	dap .-2
	jmp pyt

pyc,	esm
	law i 30
	jda fee		/feed leader
	lac (jmp 7750
	jda pnb
	law i 30
	jda fee
	dzm loc
	dzm org
	lac (pbf
	dac ts
	dzm rlc
	lac t2
	sma
	jsp gc
	 nop
	lac (st-1
	dac evp

pyl,	szs i 10
	jmp pyst
	idx evp		/set pointers
	dac sp1
	add one
	dac sp2
	add one
	dac evp
	sad (low+2
	jmp pz5
	clf 3
	extend
	lac i sp2
	sza i
	jmp pyl
          
                                                                 	extend
	lio i sp1	/sym l
	lac t2
	spi
	jmp pzs
	ril 1s
	spi i
	jmp pzv		/variable
	extend
	lio i sp2
	spi
	jmp pzm		/pseudo
	spa		/macro
	jmp pyl
	stf 3
	jmp pzp

pzs,	ril 1s
	spi i
	szm		/symbol
	jmp pyl
	extend
	lac i sp1
	sas (400000
	jmp pzp
	lac (vco
	dac pt6
pz4,	extend
	lac i sp2
	extend
	sad i pt6	/check for initial symbol
	jmp pz3
	idx pt6
	index pt6, (vco+ipt-ist, pz4
	jmp pzp

pz3,	idx pt6
	extend
	lac i evp
	extend
	sad i pt6
	jmp pyl
	jmp pzp		/not init sym

pzv,	szm		/variable
	jmp pyl
	extend
	lac i sp2
	ral 1s
	sma
	jmp pzp		/defined
	jmp pyl		/undefined
          
                                                                 
pzm,	lac (vco+ipt-ist	/pseudo-instr.
	dac pt6
pm0,	extend
	lac i sp1
	extend
	sas i pt6
	jmp pm4
	idx pt6
	extend
	lac i sp2
	extend
	sas i pt6
	jmp pm4+1
	idx pt6
	extend
	lac i evp
	extend
	sad i pt6
	jmp pyl
	jmp pm4+2
pm4,	idx pt6
	idx pt6
	index pt6, (vco+vce-ist, pm0

pzp,	extend		/punch symbol
	lac i sp1
	dac wrd
	jsp tb3
	extend
	lac i sp2
	dac wrd
	jsp tb3
	extend
	lac i evp
	szf 3
	sub (mil-1
	dac wrd
	jsp tb3
	jmp pyl

pz5,	dzm wrd
	jsp tb3		/denotes end
	jsp tb3
	jsp tb3
	jsp pub
	lac t2
	spa
	jmp pzd
	lac (mil-1		/punch macros
	dac t2
	dzm org
	dzm loc
          
                                                                 
pzh,	szs i 10
	jmp pyst
	idx t2
	sub one
	sad mai
	jmp pzd-1
	extend
	lac i t2
	dac wrd
	jsp tb3
	jmp pzh

	jsp pub
pzd,	law i 30	/punch trailer
	jda fee
	lac (jmp ps3
	jda pnb
	law i 300
	jda fee
pyst,	jsp unr
	 jmp py1
pyx,	cla
	sad 91p
	jmp .-1
	lsm
	jmp 7751

constants

symlap|
repeat 1if vp symlap-7750,print .sp overlap.

word jmp py

/constants printer

fr1/

txp,	0		/text printer
	dac tyy

tx1,	lac i tyy
	jda typ
	idx tyy
	and (7777
	sas txp
	jmp tx1
	jmp i tyy
          
                                                                 
yc|
ycn,	cbs		/constants printer
	rrb
	esm
	szs i 30
	szs 20
	jmp .+2
	jmp ycx
	lac (cor
	sad cn5
	jmp ycx
	dac t3
	law yc2
	jda txp
	357774		/red, cr, uc
	637246		/Co
	text /nstants area/
yc2,	lac pss
	sza
	jmp yc6
	law yc6
	jda txp
	text / reserved/
yc6,	law ycu
	jda txp
	text /, inclusive
from	t/
	char lo+3477

ycu,	law 1		/index over cor table
	add pss
	add t3
	dac t1
	extend
	lac i t3
	dac t2
	jda opt
	extend
	lac i t1
	sad t2
	jmp ycv
	dac t2
	jsp tb
	law i 1
	add t2
	jda opt
          
                                                                 
ycv,	law 77
	jda tyc
	law 3
	add t3
	dac t3
	sas cn5
	jmp ycu

ycx,	szs i 20	/alphabetic symbol print
	jmp ydx
	law yd
	jda txp
	357774		/red,cr,uc
	text .defined Symbols Alphabetic.
	777734		/cr,cr,blk
yd,	dzm t
	law 1
	dac t1

yd1,	move t, t2	/move ceiling regs to floor
	move t1, t3
	lac (177777
	dac t
	dac t1
	lac (st-1
	dac evp

yd2,	idx evp		/set up pointers
	dac sp1
	add one
	dac sp2
	add one
	dac evp
	sad (low+2
	jmp yd5
	extend
	lac i sp2
	sza i
	jmp yd2
	extend
	lac i sp1
	and (177777
	dac fee
	sub t2		/compare with floor
	spa
	jmp yd2
	sza
	jmp yd3
	extend
	lac i sp2
	and (177777
	sub t3
	spa
	jmp yd2
	sza i
	jmp ydp		/equal, print
          
                                                                 
yd3,	lac fee		/compare with ceiling
	sub t
	szm
	jmp yd2
	sza
	jmp ydc
	extend
	lac i sp2
	and (177777
	sub t1
	sma
	jmp yd2

ydc,	szs i 20	/printout check
	jmp ydx
	extend
	lac i sp1
	ral 1s
	spa
	jmp yd2		/flush macros, pseudos, exits
	rar 1s
	spa
	jmp ydr		/check for init sym

yd4,	extend		/set new ceiling
	lac i sp1
	and (177777
	dac t
	extend
	lac i sp2
	and (177777
	dac t1
	jmp yd2
          
                                                                 
ydp,	lac sp1		/print symbol
	jda spt
	jsp tb
	extend
	lac i evp
	jda opt		/print value
	extend
	lac i sp2
	sma
	jmp ydq
	ral 1s
	lio (725474
	sma
	jda tyy		/print relocation
	rir 6s
	jda tyy
	rir 6s
	sma
	jda tyy
	law char rr
	jda tyc

ydq,	law 77
	jda tyc
	jmp yd2

ydr,	extend
	lac i sp2	/check for init sym
	and (600000
	sas (200000
	jmp yd4
	jmp yd2

yd5,	lac (177777
	sad t2
	sas t3
	jmp yd1
ydx,	cla
	sad 91p
	jmp .-1
	lsm
	jmp 7751

constants

word jmp ycn
          
                                                                 
/numeric symbol print

yc/

sy,	cbs
	rrb
	esm
	szs i 30
	jmp syx
	law sy0
	jda txp
	777735
	text .Defined Symbols Numeric.
	777734
sy0,	dzm t

sya,	lac t		/move ceiling to floor
	dac t1
	clc
	dac t
	lac (st-1
	dac evp

syb,	idx evp		/set pointers
	dac sp1
	add one
	dac sp2
	add one
	dac evp
	sad (low+2
	jmp sq6
	extend
	lac i sp2
	sza i
	jmp syb
	extend
	lac i evp
	dac t3
	lio t3
	xor t1
	spa		/compare with floor,
	jmp sq5		/allowing for overflow
	sza i
	jmp syc
	xor t1
	sub t1
sq1,	spa
	jmp syb

sq2,	lac t
	xor t3
	spa		/compare with ceiling
	jmp sq3
	lac t3
	sub t
sq4,	sma
	jmp syb
	jsp sq7
          
                                                                 
syp,	lio t3
	dio t
	jmp syb

sq7,	dap sqx
	szs i 30		/check for print
	jmp syx
	extend
	lac i sp2
	sza i
	jmp syb
	extend
	lac i sp1
	ral 1s
	spa
	jmp syb		/pseudo or macro
	rar 1s
	spa
	jmp syr		/check for init sym
sqx,	jmp .

sq5,	lac t1
	jmp sq1

sq3,	lac t
	jmp sq4

syc,	jsp sq7
	lac sp1
	jda spt		/print symbol
	jsp tb
	lac t3
	jda opt		/print value
	extend
	lac i sp2
	sma
	jmp syq
	ral 1s
	lio (725474
	sma
	jda tyy		/print relocation
	rir 6s
	jda tyy
	rir 6s
	sma
	jda tyy
	law char rr
	jda tyc

syq,	law 77
	jda tyc
	jmp syb
          
                                                                 
syr,	extend
	lac i sp2	/check for init sym
	and (600000
	sas (200000
	jmp sqx
	jmp syb		/initial symbol

sq6,	clc
	sas t1
	jmp sya

syx,	cla
	sad 91p
	jmp .-1
	szs 40
	jmp utili
	lac pss
	sza
	jmp s6
	jmp 1st
          
                                                                 /utility subprogram

utili,	lsm
	eem
	jmp util4

util1,	i 61
	idx util6
	jmp .+4
util4,	lio util1
	mse
	mlc
util5,	mrs
	spi i
	jmp .-2
	ril 1s
	spi
	jmp i util8
	mrd
util3,	dio i util6
	law 7617
	and i util7
	sza
	jmp util5
	idx util1
	law util1+1
	dap .-3
	jmp util4

util6,	i 7300
util7,	i 7300
util8,	i 7301


constants
start sy
          
                                                                                                                                                              
