           
music compiler_ 27/1/67

top=7777

rbl.=40

dimension rdb(140),rbf(rbl)

define error x
	jsp er
	flexo x
terminate

define complain x
	jsp er1
	flexo x
terminate

0/	dzm .rpc	/initialize input file
	law 373
	770070
	lio (20001
	law t1
	dcc
	hlt
	law i rbl-1
	and t1
	dac .ddp
	xor t1
	add (rbf-1
	dac .inp
	law 7777
	and ddp
	770070
	xor ddp
	ior (rbl
	lia
	law rbf
	dcc
	hlt
	law 47
	arq
	jmp pby

rt,	law rdb	/compile one part
	dap poi
	dap fl2
	jsp in	/read title
	sad (13
	jmp .-2
	dac ch
	dac i poi
	idx poi
	sad (dac rdb+140
	jmp rt1
	law 21
	sas ch
	jmp rt+3
                
k                                
rt1,	lio i fl2
	tyo
	idx fl2
	sas poi
	jmp rt1
	law 21
	sas ch
	jmp rt
	cli>>05<<cmi
	tyo
	law 600
	dap er3
	cla
	dap bbs	/on if alternate bar label permitted
	clc
	dac tim	/previous time=undefined
	law 1
	dac bl1
	dac bl2
	law 77
	dac ch	/initial separator=c.r.
	law 34
	dac .clr	/initial color=black
	lac (top+1
	dac .bc
	law not-1
	dac .nl
	law 32.x6
	dac .3u	/units=32
	clc
	dac .irl	/location of a rest
	law 6
	dac .trl	/trill time=32nd
	law 25.
	dac clef	/clef=treble
	law 2
	dac ss	/normal articulation=e
	dzm .nl1	/repeat indicators
	dzm .nl2
	dzm tll	/up/down=0
	law kt	/key=)
	dap .+1
	dzm .
	idx .-1
	sas .+2
	jmp .-3
	dzm kt+49.
                
_                                
lu0,	law i not-1	/set lmb to point at next measure
	add nl
	dac .lmb
lu1,	dzm .mm	/time used in this measure
	clc
	dac .ltn	/last note in this measure
	law 600
	dap mts
	law mt	/clear accidentals
	dap .+1
	dzm .
	idx .-1
	sas .+2
	jmp .-3
	dzm mt+49.
	dzm .rob	/time robbed for grace notes

lup,	jsp read
	add cm
	sza
	jmp ff	/numeric fields or comma present
	lac cn
	sza i
	jmp out	/nothing
	sub (7	/pseudo-instruction
	sma
	jmp nps
	law ttb
	dap sp
sp,	lac .
	sas tf1
	jmp ng1
	idx sp
	lac i sp
	sas tf2
	jmp ng1+1
	idx sp
	jmp i sp
ng1,	idx sp
	idx sp
	idx sp
	sas (lac ttn
	jmp sp
nps,	error nps
	jmp out

pby,	jsp txx
	text /punch busy
_/
	dsm
                
o                                
open,	clc
	dac ltn
	lac nl1
	ior nl2
	sza
	jmp tmo
	law i not-1
	add nl
	sas lmb
	jmp op1
	lac nl	/at beginning of measure
	dac nl2
	dac .nl3
	lac bc
	dac .bcs
	dzm .mms
	jmp out
op1,	lac nl
	dac nl1
	lac mm
	dac mms
	jmp out
tmo,	error tmo
	jmp out

close,	clc
	dac ltn
	lac nl2
	sza i
	jmp cls
	lac mms
	sza i
	jsp dun
	lac bc
	dac t3
	law 1
	add nl
	dac t2
	lac mm
	add mms
	sza i
	jmp cl2
	sub 3u
	sza
	jmp clt
cl2,	lac nl3
	sad nl2
	jmp cl4
cl1,	sad nl2
	jmp cl3
	lac i nl3
	jda nc
	idx nl3
	jmp cl1
                
e                                
cl3,	lac (600000
	jda nc
	lac lmb
	jda sbc
cl4,	law not
	add lmb
	dac t1
	dzm nl2
	law i not-1
	add nl
	dac lmb
	lac t1
cl5,	sad t2
	jmp cl6
	lac i t1
	jda nc
	idx t1
	jmp cl5
cl6,	lac bcs
	sad t3
	jmp out
	law i 1
	adm bcs
	lac i bcs
	jda sbc
	jmp cl6

cls,	lac nl1
	sza
	jmp rtc
	error nop
	dzm nl1
	jmp out
rtc,	error rtc
	jmp out
clt,	spa
	jmp .+4
	error rtl
	jmp cl2
	xct mts
	jmp cl2
	error rts
	jmp cl2
                
                                 
ttb,	text /s     /	jmp s
	text /e     /	jmp e
	text /l     /	jmp l
	text /h     /	jmp h
	text /q     /	jmp q
	text /sert  /	jmp rest
	text /yek   /	jmp key
	text /pocy  /	jmp copy
	text /inust /	jmp units
	text /pp    /	jmp pp
	text /p     /	jmp p
	text /fm    /	jmp mf
	text /f     /	jmp f
	text /metop /	jmp tempo
	text /dne   /	jmp end
	text /otsp  /	jmp sto
	text /irtll /	jmp trill
	text /sabs  /	jmp bass
	text /ertelb/	jmp treble
	text /netro /	jmp tenor
	text /tlao  /	jmp alto
	text /pu    /	jmp up
	text /wodn  /	jmp down
	text /epon  /	jmp open
	text /olces /	jmp close
ttn,
rest,	jsp dun
	jsp read
	sza i
	jmp .-2
	lac nf1
	sza i
	jmp lu1
	cma
	dac nf1
	lac irl
	sma
	jmp irm	/rest already exists
	law i not-1
	add nl
	dac irl	/location of rest
	lac 3u
	jda nc
	lac (600000
	jda nc
irh,	lac lmb
	jmp irn+1
irm,	law i not-1
	add nl
	sas lmb
	jmp irk
irn,	lac irl
	jda sbc
	isp nf1
	jmp irn
	jmp lu0
irk,	law not	/stray tempo or loudness commands
	add irl
	dap .+1
	lac .
	jda nc
	lac (600000
	jda nc
	jmp irh
copy,	jsp dun
	jsp read
	sza i
	jmp .-2
	cla
	dap bbs	/forbid alternate labels
	law i 1
	add bl1
	sub nf1
	spa
	jmp blc
	add bc
	dac .cbh
	lac nf1
	dac t1
	jsp read
	sza i
	jmp .-2
	law i 2
	add bc
	add bl1
	sub nf1
	dac nf2
	law 1
	add nf1
	sub t1
	spq
	jmp brc
	law i not-1
	add nl
	sad lmb
	jmp cl
	law not	/stray tempo or loudness commands
	add i cbh
	dap .+1
	lac .
	jda nc
	sad (600000
	jmp .+3
	idx .-4
	jmp .-5
	lac lmb
	jmp cl+1
cl,	lac i cbh
	jda sbc
	law i 1
	adm cbh
	sas nf2
	jmp cl
	jmp lu0
blc,	error blc
	jsp read
	sza i
	jmp .-2
	jmp lu1
brc,	error brc
	jmp lu1

tempo,	jsp read
	sza i
	jmp tempo
	lac nf1
	ior (700000
	jda nc
	jmp out

pp,	cla
	jmp f+1
p,	law 1
	jmp f+1
mf,	law 2
	jmp f+1
f,	law 3
	ior (500000
	jda nc
	jmp out

sto,	law cln
	jmp .+2
end,	law rt
	dap p45
	jsp dun
	lac (600000
	dac i nl	/make sure notes end with 600000
	cla
	jda nc	/note/bar marker
	lac bc
	sad (top+1
	jmp p45	/no music
	law not
	dac t3	/punch pointer
	idx nl
	sub bc
	add (top-not+1	/total size of info
p41,	jda ppp
	law i 6
	jda fee
	law i 104
	dac t1	/block count
	dzm t2	/checksum
p42,	lac i t3
	jda ppp
	lac i t3
	adm t2
	idx t3
	sad (top+1
	jmp p43	/done
	sad nl
	lac bc	/change from notes to bars
	dac t3
	isp t1
	jmp p42
	lac t2
	jmp p41	/punch checksum
p43,	lac t2
	jda ppp	/punch last checksum
	law i 20
	jda fee
p45,	jmp .

cln,	law i 20	/all parts finished
	jda fee
	lac (600000
	jda ppp
	law i 520
	jda fee
	law i 47
	arq
	dsm

out,	law 21
	sas ch
	jmp lup
	jsp dun
	jmp lu1

dun,	dap dux
	lio mm
	sni
dux,	jmp .
	lac rob
	sza i
	jmp du2
	complain itg
du2,	lac (600000
	jda nc
	lac lmb
	jda sbc
	lac nl1
	sza i
	jmp du1
	add (1
	dac .nl3
	dzm nl1
	lac nl
	dac nl2
	lac bc
	dac .bcs
	lac mm
	sub mms
	lio mms
	sni i
	dac mms
du1,	law i not-1
	add nl
	dac lmb
	lac mm
	sub 3u
	sza i
	jmp dux
	spa
	jmp mts
	complain mtl
	jmp dux
mts,	skp .
	jmp dux
	complain mts
	jmp dux
ff,	lac cn
	sza
	jmp ff1	/other characters present
	lac nf1	/bar label
	sad .bl1	/current bar
	jmp bb1
	sad .bl2	/alternate bar
bbs,	skp .	/skip if alternate bar permitted
	jmp bbl
bb1,	dac bl1
	cla
bb2,	dap bbs
	jmp out
bbl,	error bbl
	lac nf1
	dac bl2	/permit alternate numbering
	law 600
	jmp bb2

ff1,	law 1	/a note
	sub cm
	sma
	jmp ff2
	law 1
	dac cm
	error tmc
ff2,	law 1
	sub g1
	sma
	jmp ff3
	error tmg
	law 1
	dac g1
ff3,	law 1
	sub r1
	sma
	jmp ff4
	error tmr
	law 1
	dac r1
ff4,	lac r1
	and g1
	sza
	jmp tmf
	law 2
	sub cm
	sub r1
	sub nf
	spa
	jmp tmf
	lac r1
	sza i
	jmp l7
	lac sid	/rest
	szm
	jmp l7
	lac ltn	/no explicit articulation on last note
	spa
	jmp l7	/last note was in this measure
	lio i ltn
	cla
	ril 3s
	rcr 3s
	dio i ltn	/make preceding note legato
l7,	lio cm
	sni i
	jmp l5
	law i 2	/no comma
	add r1
	add g1
	add nf
	spa
	jmp tff	/must have 2 of r,g,number
	lac g1
	sza
	jmp gr	/grace note
l6,	law 177
	and nf2	/check duration
	sza
	sas nf2
	jmp ert
	add (rcr-1
	dac qq
	and nf2
	sza
	jmp ert
	lac fu
	cli
qq,	0
	sza>>05<<sni i
	jmp dtu	/dot underflow
	dac .tim	/duration in 64ths with dots
	lio c1
	dio .ccc	/save triplet status
	rir 2s
	spi i
	ral 1s
	sni
	add tim
	dac .nfp
	dac .nft	/duration in 192nds with dots and triplets
	lac g1
	sza i
	jmp nr
gn,	lac nft	/grace note
	adm .rob
	jmp ng+1

l5,	lac c1	/comma, get previous time
	ior ccc
	lia
	lac tim	/previous time in 64ths
	spa
	jmp unc	/undefined
	rir 2s
	spi i
	ral 1s
	sni
	add tim
	dac nfp
	dac nft
	law 100
	sas fu
	jmp tic	/no dots allowed
	lac g1
	sza
	jmp gr	/grace note with comma
	jmp ng+1

gr,	law 1
	sas nf
	jmp l6	/if two fields, use given duration
	lac (rcr 5s
	dac qq
	jmp qq-2	/make it a 32nd

nr,	lac rob	/not grace note or comma
	sza i
	jmp ng+1
	cma
	adm nft	/rob it
	sub (6
	sma
	jmp ng
	lac nft	/only 1/32nd left
	sub rob
	sma
	jmp ng	/ok anyway
	error itg
	lac nfp	/unrob it
	dac nft
ng,	dzm rob
	lac r1
	sza
	jmp rr	/rest
	lac nf
	sza i
	jmp cpp	/copy pitch
	lac a1
	sub b1
	dac a1
	ral 1s
	add a1
	ral 2s
	add nf1	/pitch corrected for a,b
	add clef
	dac .ton	/0=7th leger line below bass clef
		/49=space above 7th leger line above treble clef
	spa
	jmp uat
	sub (50.
	sma
	jmp uat
s2v,	law mt
	add ton
	dap pmt
	add (nt-mt
	dap pnt
	add (kt-nt
	dap pkt
	lac sh
	add fl
	add na
	sza i
	jmp pmt	/no accidentals given
	cla
	sas sh
	sad fl
	jmp s2w
	error nor
	jmp pmt
s2w,	lac sh
	sub fl
pkt,	sub .
	dac i pmt	/save it in mt for rest of measure
	jmp pmt+1
pmt,	lac .
	add i pkt
pnt,	add .
	dac .tne	/corrected for accidentals, key sig. a, b, clef
		/0=4th g below middle c
		/84=4th g above middle c
	add tll	/correct for up, down
	sub (10.
	spa
	jmp uat
	sub (63.
	sma
	jmp uat
	add (64.
	dac tne	/1=3rd f below middle c "bass b5"
		/63=3rd g above middle c "treble 17"
	lac si	/calculate articulation
	spa
	jmp tms
	sza i
	jmp tmt
	sub (1
	jmp .+2
tmt,	lac ss	/get implicit articulation
	dac .sv	/l=0, s=1, e=2, h=3, q=4
	lac et	/check for embellishments
	spa
	jmp tme
	sza
	jmp emb
	lac sv
	ral 6s
	jmp .+2
s70,	cla
	ior tne
	ral 9s
	ior nft
	jda nc
	lac nl
	dac ltn	/last note
s72,	lac nft
	adm mm	/no. of 192nds used in measure
	lac si
	dac .sid	/explicit articulation of last note
	jmp out

cpp,	lac tne	/copy pitch from previous note
	sza i
	jmp rr	/was a rest
	lac ton
	jmp s2v

rr,	dzm tne
	lac sh
	ior na
	ior fl
	ior si
	ior et
	sza i
	jmp s70
	error air
	jmp s70

eor,	error eor
	jmp s70
eit,	error eit
	jmp s70
tme,	error tme
	jmp s70
tms,	error tms
	jmp tmt
uat,	error uat
	dzm tne
	jmp s70
tmf,	error tmf
del,	cla	/drop a note, suppress mts error
	dap mts
	jmp out
tff,	error tff
	jmp del
ert,	error ert
	jmp del
unc,	error unc
	jmp del
dtu,	error dtu
	jmp del
tic,	error tic
	jmp del

up,	jsp read
	sza i
	jmp up
	lac nf1
up1,	dac .tll
	jmp out

down,	jsp read
	sza i
	jmp down
	lac nf1
	cma
	jmp up1

bass,	law 13.
	jda clef

tenor,	law 17.
	jda clef

alto,	law 19.
	jda clef

treble,	law 25.
	jda clef

clef,	0
	jmp out
units,	jsp read
	sza i
	jmp units
	lac nf1
	ral 1s
	add nf1
	ral 1s
	dac 3u
	clc
	dac irl
	jmp out

l,	cla
	jda ss
s,	law 1
	jda ss
e,	law 2
	jda ss
h,	law 3
	jda ss
q,	law 4
	jda ss

ss,	0
	jmp out
                
q                                
emb,	law i 49.
	add ton
	sma
	jmp eor
	add (49.
	spq
	jmp eor
	add (mt-1
	dap pmt
	add (nt-mt
	dap pnt
	add (kt-nt
	dap pkt
	lac i pmt
	add i pnt
	add i pkt
	add tll
	add lwr
	sub (10.
	spa
	jmp eor
	sub (63.
	sma
	jmp eor
	add (64.
	dac .tnd	/next lower note
	law 2
	adm pmt
	law 2
	adm pnt
	law 2
	adm pkt
	lac i pmt
	add i pnt
	add i pkt
	add tll
	add upr
	sub (10.
	spa
	jmp eor
	sub (63.
	sma
	jmp eor
	add (64.
	dac .tnf	/next higher note

	lac i et	/minimum time required
	mul trl
	scr 1s
	lai
	sub nft
	szm
	jmp eit	/too short
	idx et
	jmp i et	/dispatch
                
,                                
m2,	2	/m - trill
	jsp tr1
	lio tne
	sma
	lio tnf

trn,	lai	/finish trill
	ral 9s
	ior .t1
	jda nc
	lac t1
	cma
	adm t2
	law i 1
	adm .t3
	sza i
	jmp s72	/done
etl,	lac t2
	sal 1s
	add t3
	and (-1
	cli>>05<<swp
	div t3	/calculate time for next note
	hlt
	dac t1
	lac t3	/number of notes remaining
	rar 1s
tr3,	jmp .

tr1,	dap tr3	/set up trill
	lac nft
	dac t2
	add trl
	and (-1
	cli>>05<<swp
	div trl
	hlt
	sal 1s	/total number of cycles
	dac t3
	jmp etl

n2,	4	/n - trill with grace notes
	jsp tr1
	lio tne
	sma
	lio tnf
	sad (1
	lio tnd
	jmp trn

k2,	2	/o - mordent
	law 3
	dac t3
	law m2+2
	jmp f3
                
                                
w2,	2	/w - inverted trill
	jsp tr1
	lio tne
	spa
	lio tnf
	jmp trn

f2,	4	/f - full turn
	law 5
	dac t3	/split time 5 ways
	law n2+2
f3,	lio nft
	dio .t2
	dap tr3
	jmp etl

d2,	3	/d - inverted mordent
	lac tne
	ral 9s
	ior trl
	jda nc
	lac tnd
	ral 9s
	ior trl
	jda nc
	lac trl
	ral 1s
etx,	cma	/use up remaining time
	add nft
	ral 3s
	ior sv
	ral 6s
	ior tne
	ral 9s
	jda nc
	jmp s72

u2,	4	/u - turn
	lac tnf
	ral 9s
	ior trl
	jda nc
	lac tne
	ral 9s
	ior trl
	jda nc
	lac tnd
	ral 9s
	ior trl
	jda nc
	lac trl
	ral 1s
	add trl
	jmp etx
                
7                                
p2,	3	/p - mordent
	lac tnf
	rar 8s
	ior trl
	sar 1s
	jda nc
	lac tne
	rar 8s
	ior trl
	sar 1s
	jda nc
	lac tnf
	rar 8s
	ior trl
	sar 1s
	jda nc
	lac trl
	sar 1s
	dac t3
	sal 1s
	add t3
	jmp etx

o2,	3	/o - odd numbered trill
	lac nft
	dac t2
	and (-1
	cli>>05<<swp
	div trl
	hlt
	sal 1s
	add (1
	dac t3
	law m2+2
	dap tr3
	jmp etl
                
,                                
trill,	jsp read
	sza i
	jmp trill
	law 177
	and nf2
	sza
	sas nf2
	jmp ertt
	add (rcr-1
	dac qqt
	and nf2
	sza
	jmp ertt
	lac fu
	cli
qqt,	0
	sza>>05<<sni i
	jmp dtut
	dac t1
	lio c1
	rir 2s
	spi i
	ral 1s
	sni
	add t1
	dac .trl
	jmp out

dtut,	error dtu
	jmp out
ertt,	error ert
	jmp out
                
g                                
key,	law kt
	dap .+3
	law mt
	dap .+2
	dzm .
	dzm .
	idx .-2
	idx .-2
	sas .+2
	jmp .-5
	dzm mt+49.
	dzm kt+49.
ke2,	jsp read
	sza i
	dzm nf1
	add sh
	add na
	add fl
	sza i
	jmp ke2
	lac na
	sza
	jmp out
	clf 2
	lac fl
	sza i
	stf 2	/sharp
	sza i
	lac sh
	sub nf1
	spa
	cla
	add nf1
	dac nf2
	law i 1
	szf 2 i
	law i 5
	dac nf
ke3,	lac nf2
	sza i
	jmp out
	lac nf
	dac cn
ke4,	law 7
	adm cn
	sub (49.
	sma
	jmp ke5
	add (kt+49.
	dap .+4
	law i 1
	szf 2
	law 1
	adm .
	jmp ke4
ke5,	law 3
	szf 2
	law 4
	add nf
	sma
	sub (7
	dac nf
	law i 1
	adm nf2
	jmp ke3
                
f                                
nc,	0	/deposit note
	dap cnx
	idx .nl
	sad bc
	jmp tof
	lac nc
	dac i nl
cnx,	jmp .

sbc,	0	/deposit bar
	dap sbx
	law i 1
	adm bc
	sad nl
	jmp tof
	lac sbc
	dac i bc
	idx bl1
	idx bl2
sbx,	jmp .

fee,	0	/feed
	dap fex
	szs 10
	jmp fex
	cli
	ppa
	isp fee
	jmp fee+2
fex,	jmp .

ppp,	0	/punch binary word
	dap ppx
	szs 10
	jmp ppx
	lio ppp
	ppb
	ril 6s
	ppb
	ril 6s
	ppb
ppx,	jmp .
                
>>12<<                                
in,	dap inx		/read character
	isp rpc
	jmp inj
	law i 3
	dac rpc
	idx inp
	sad (rbf+rbl
	jmp rpe
inj,	lac i inp
	ral 6s
	dac i inp
	and (77
	sas (77
	sad (13
	dzm rpc
inx,	jmp .

rpe,	law rbl
	adm ddp
	and (7777
	770070
	xor ddp
	ior (rbl
	lia
	law rbf
	dac inp
	dcc
	hlt
	jmp inj

er,	clf 3		/error - print syllable in red
	jmp .+2
er1,	stf 3		/error
	dap erx
	szf 6
	jmp er3	/entire line already in
	lac poi	/read in rest of line
	dap fl2
	lac ch
erk,	sad (77
	jmp er3
	idx fl2
	sad (dac rdb+140
	jmp bof
	jsp in
	dac i fl2
	jmp erk
er3,	skp .
	jmp erq
	jsp red
	jsp txx
	text /
To err is human---to forgive, divine.

_/
                
c                                
	cla
	dap er3
	jsp blk
erq,	szf 5
	jmp erm	/syllable already printed
	szf 3
	szf 6 i
	jmp .+2
	jmp erm	/call to er1 and line has been printed
	law rdb
	dap fl2
erl,	szf 3
	jmp ern
	lac fl2
	sad fl1
	jsp red
	lac fl2
	sad poi
	jsp blk
ern,	lio i fl2
	tyo
	idx fl2
	lai
	sas (77
	jmp erl
erm,	stf 5
	stf 6
	lio (36
	tyo
	szf 3
	jsp red
	szf 3 i
	jsp blk
erx,	lac .
	lio .+3
	rcl 6s
	tyo
	sas .
	jmp .-3
	clc>>05<<lia
	tyo
	idx erx
	jsp blk
	jmp i erx
                
>>75<<                                
bof,	jsp txx
	text /
Source line has too many characters.
_/
	law rdb
	dap poi
	lio i poi
	tyo
	idx poi
	sas (dac rdb+100
	jmp .-3
	clc>>05<<lia
	tyo
	dsm

tof,	jsp txx
	text /
Table overflow. Subdivide source text.
_/
	dsm

red,	dap rx
	law 35
	jmp .+3
blk,	dap rx
	law 34
	sad clr
rx,	jmp .
	dac clr
	lia
	tyo
	jmp rx

txx,	dap txy
	lio i txy
	idx txy
	lac (607600
	rcl 6s
	sad (lai
txy,	jmp .
	sad .+2
	jmp txx+1
	swp
	tyo
	lia
	jmp txy-3
                
	                                
read,	dap rex		/read syllable and terminator
	law 77
	sas ch
	jmp re1
	law rdb-1	/if new line, reset buffer
	dap poi
	clf 6	/on if line already in buffer
re1,	law 1
	add poi
	dap fl1	/points to first character of syllable
	law 40	/current value of dot
	dac .fc
	law 100	/dots accumulated in fu
	dac .fu
	dzm tf1
	dzm tf2
	law tf1
	dap tp
	dzm .cn	/counts non-numeric characters
	law nf1
	dap np
	dzm a1	/clear all counters
	dzm b1
	dzm c1
	dzm g1
	dzm r1
	dzm cm
	dzm fl
	dzm na
	dzm sh
	dzm .si
	dzm .upr
	dzm .lwr
	dzm .et
	clf 4	/on if reading comment
	clf 5	/on if number partially entered
rlp,	idx poi
	sad (dac rdb+140
	jmp bof
	szf 6
	jmp in1	/character already in
	jsp in
poi,	dac .
	sad (72
	clf 4
	szf 4
	jmp rlp	/comment
	dac .ch
	add (dtb
	dap dtp
                
s                                
dtp,	lio .
	spi i
	jmp tp-1
	xct i dtp
	jmp ema	/articulation or embellishment
	lio i dtp	/i,j,y, or z
	rir 2s
	law upr
	spi
	law lwr
	dap emu
	law 1
	and i dtp
	sza i
	law i 1
emu,	adm .
	jmp tp

ema,	spa
	jmp em
	lio si
	dac si
	sni
	jmp tp
	clc	/too many
	dac si
	jmp tp

em,	lio et
	dap et
	sni
	jmp tp
	clc	/too many
	dac et
	jmp tp

	idx i dtp	/count
tp,	lac .
	lio ch
	rcr 6s
	dac i tp	/pack
	idx cn
	sad (3
	idx tp
	szf 5
	idx np
	jmp rlp-1

in1,	lac i poi
	jmp poi+1
                
r                                
dtb,	jmp sep	/space
	repeat 11,jmp n
	jmp rlp
	jmp rlp	/stop code
	jmp rlp
	jmp rlp
	jmp rlp
	jmp rlp
	jmp n	/0
	jmp sep	/slash
	law 2	/s - stacatto
	jmp tp	/t
	law i 7777-u2	/u - turn
	jmp tp
	law i 7777-w2	/w - inverted trill
	jmp xe	/x
	sni 3	/y - raise lower note
	sni 2	/z - depress lower note
	jmp rlp
cm,	0	/comma
	jmp rlp
	jmp rlp
	jmp sep	/tab
	jmp rlp
	jmp rlp
	sni 0	/j - depress upper note
	law i 7777-k2	/k - mordent
	law 1	/l - legato
	law i 7777-m2	/m - trill
	law i 7777-n2	/n - trill with grace notes
	law i 7777-o2	/o - odd numbered trill
	law i 7777-p2	/p - shake
	law 5	/q - quarter
r1,	0	/r - rest
	jmp rlp
	jmp rlp
fl,	0	/- - flat
na,	0	/) - natural
	jmp rlp
sh,	0	/( - sharp
	jmp rlp
a1,	0	/a - above
b1,	0	/b - below
c1,	0	/c - triplet
	law i 7777-d2	/d - inverted mordent
	law 3	/e - normal articulation
	law i 7777-f2	/f - full turn
g1,	0	/g - grace note
	law 4	/h - half
	sni 1	/i - depress upper note
	jmp rlp
	jmp dot	/dot
	jmp upc	/upper case
	jmp rlp
	jmp rlp
	jmp sep	/car. ret.
dtb+100,
                
z                                
tf1,	0	/text of pseudo-instruction
tf2,	0
nf1,	0	/first numeric field
nf2,	0

n,	lac .	/digit
	sad np
	jmp np1
	szf 5 i
	dzm i np
np,	lac .
	ral 2s
	add i np
	ral 1s
	lio ch
	rir 5s
	spi i
	add ch
	dac i np
	dac nf2
np1,	stf 5
	jmp rlp

upc,	stf 4	/upper case
	jmp rlp

sep,	szf 5	/space, tab, c.r., or slash
	idx np
	lac np
	sub (lac nf1
	dac .nf	/number of numeric fields
	clf 5	/on if syllable is printed
rex,	jmp .

dot,	lac fc	/dot
	sma
	adm fu
	spa
	dzm fu	/dot error
xe,	lac fc	/x
	sma
	rar 1s
	dac fc
	jmp tp

fl1,	dac .	/points to beginning of syllable
fl2,	dac .	/pointer used by err
constants
                
.                                
nt,	/main pitch table
decimal
0	2	4
5	7	9	10
12	14	16
17	19	21	22
24	26	28
29	31	33	34
36	38	40
41	43	45	46
48	50	52
53	55	57	58
60	62	64
65	67	69	70
72	74	76
77	79	81	82
84
octal
kt,	.+50./	/key signature table
mt,	.+50./	/status of current measure
variables
not,
start 0
                
                                                              

