                                 
music decompiler_ 14/1/67

0/	law charac rr
	arq i
	jmp l0
	jsp txx
	text /reader_/
	tyi
	jmp 0
l0,	law not
	dac .nl
	law 7777
	dac .bc
	rpb
	cmi
	dio .cou
	dzm .csm
l1,	rpb
	dio i nl
	lai
	adm csm
	idx nl
	sad bc
	jmp ovf
	isp cou
	jmp l1
	rpb
	lai
	sas csm
	jmp cse
	rpb
	cmi
	dio cou
	dzm csm
l2,	rpb
	lai
	adm csm
	lai
	add (not
	dac i bc
	law i 1
	adm bc
	sad nl
	jmp ovf
	isp cou
	jmp l2
	rpb
	lai
	sas csm
	jmp cse
	law i charac rr
	arq
l24,	law charac rp
	arq i
	jmp l26
	jsp txx
	text /punch_/
	tyi
	jmp l24

ovf,	jsp txx
	text /storage full
_/
	dsm
cse,	law i 51
	arq
	jsp txx
	text /checksum
_/
	tyi
	jmp 0

l26,	jsp txx
	text /title
_/
	szs 20
	jmp 0
l3,	tyi
	lai
	jda pch
	sas (21
	jmp l3
	clc
	jda pch
                
a                                
l25,	jsp txx
	text /
clef _/
	tyi
	lai
	sad (charac rb
	jmp bas
	sad (charac ra
	jmp alt
	sas (charac rt
	jmp er1
	tyi
	lai
	sad (charac rr
	jmp tre
	sas (charac re
	jmp er1
	jsp txx
	text /nor
_/
	jsp pxx
	text /
tenor
_/
	law i mt+24.
	jda cle
tre,	jsp txx
	text /eble
_/
	jsp pxx
	text /
treble
_/
	law i mt+32.
	jda cle
alt,	jsp txx
	text /lto
_/
	jsp pxx
	text /
alto
_/
	law i mt+26.
	jda cle
bas,	jsp txx
	text /ass
_/
	jsp pxx
	text /
bass
_/
	law i mt+20.
	jda cle
cle,	0	/clef stored here
l35,	jsp txx
	text /key _/
	dzm stk
                
,                                
	tyi
	lai
	sad (charac r)
	jmp na
	clf 2
	sad (charac r-
	jmp sh+1
	sas (charac r(
	jmp er2
sh,	stf 2
	jsp rin
	szf 2 i
	cma
	dac stk
	jmp .+3
na,	clc>>05<<lia
	tyo
	jsp stk+1
	lac stk
	sza i
	jmp l5
	spa
	jmp f1
	jsp pxx
	text /key (_/
	lac stk
	jda dpt
	clc
	jda pch
	jmp l5
f1,	jsp pxx
	text /key -_/
	lac stk
	cma
	jda dpt
	clc
	jda pch
l5,	dzm .tll
	jsp txx
	text .up/down _.
	tyi
	lai
	sad (77
	jmp l6
	sad (charac ru
	jmp up
	sas (charac rd
	jmp er4
	jsp txx
	text /own _/
	jsp rin
	cma
	dac tll
	jsp pxx
	text /down _/
	lac tll
	cma
	jda dpt
	clc
	jda pch
	jmp l6
                
u                                
up,	jsp txx
	text /p _/
	jsp rin
	dac tll
	jsp pxx
	text /up _/
	lac tll
	jda dpt
	clc
	jda pch
l6,	lac not
	and (700000
	sas (700000
	jmp l7
	jsp pxx
	text /tempo _/
	law 7777
	and not
	jda dpt
	clc
	jda pch
	lac (nop
	dac not
l7,	jsp txx
	text /starting measure _/
	jsp rin
	dac .bl
	law 7777
	dac bc
	lac 7777
	jda bar
	jsp uni
	clc
	dac .ps	/pitch saved
	dac .ds	/duration saved
	jda pch
	law not
	dac nl
l8,	dzm .chc	/decompile one measure
	law kt
	dap .+3
	law mt
	dap .+2
	lac .
	dac .
	idx .-2
	idx .-2
	sas (dac mt+50.
	jmp .-5
	lac i bc
	sas nl
	jmp cpy	/copy or rest required
l9,	lac nl
	jda bar
	lac lng
	sas 3u
	jsp uni	/units if required
	lac bl
	jda dpt	/bar label
                
r                                
lup,	law 1	/decompile one note
	add bar	/this note
	dac .brn	/next note
	lac i bar
	and (700000
	sad (700000
	jmp tm	/tempo
	sad (600000
	jmp lu2	/end of measure
	jsp sep
	clf 2	/off if t needed
	lac i brn
	and (700000
	sad (700000
	jmp l3f
	lac i brn
	rar 7s
	and (77
	sas (1
	jmp l3f
	lac i bar
	and (377777
	dac i bar	/rest follows, suppress l
l3f,	lac i bar
	rar 7s
	and (77
	sad (1
	jmp rs	/rest
	add (17
	sub tll
	dac .t1
	law (0
	dac .bmt
	law mt+1
	dac .pmt
pml,	law 7777
	and i pmt
	sub t1
	sma
	jmp pmf	/found one
	lac pmt
	dac bmt
	idx pmt
	sas (mt+50.
	jmp pml
ann,	jsp txx
	text /anomalous note
_/
	jsp pxx
	text .???_.
	jmp nxn
pmf,	clf 4	/on if accidentals
	sza i
	jmp pmq	/no accidentals
	stf 4
/check for reversal of earlier accidental
	law i mt-kt
	add pmt
	dap .+1
	lac .
	sad t1
	jmp pmd
	law i mt-kt
	add bmt
	dap .+1
	lac .
	sad t1
	jmp pmd-2
/check for reversal of key signature
	law i mt-nt
	add pmt
	dap .+1
pnt,	lac .
	sad t1
	jmp pmd
	law i mt-nt
	add bmt
	dap .+1
bnt,	lac .
	sad t1
	jmp pmd-2
/check for accidental that won't have to be changed back
	lac i brn
	and (700000
	sas (700000
	sad (600000
	jmp pmz
	lac i brn
	rar 7s
	and (77
	add (17
	sub tll
	sad i pmt
	jmp pmd-2
	sad i bmt
	jmp pmd
/check for F sharp, C sharp, B flat, E flat
pmz,	law i mt
	add pmt
	mul (1
	div (7
	hlt
	lai
	sas (4
	sza i
	jmp pzs	/F sharp or C sharp
	sas (2
	sad (5
	jmp pzf	/B flat or E flat
	jmp pmy

pzs,	lac t1
	sub i bnt
	sad (1
	jmp pmd-2
	jmp pmy

pzf,	lac i pnt
	sub t1
	sad (1
	jmp pmd

/make accidental same sign as original key signature
pmy,	lac stk
	spa
	jmp pmd
	lac bmt
	dac pmt
pmd,	law i mt-nt
	add pmt
	dap .+1
	lac .
	sub t1
	dac .t3
	stf 2
pmq,	lac t1
	dac i pmt
	lac cle
	adm pmt
	law 177
	and i bar
	sas ds
	jmp f3
	lac pmt	/same duration, will use comma
	sad ps
	jmp f7	/same pitch also
                
9                                f3,	lac pmt
	spa
	jmp .+3
	jda dpt
	jmp f7
	stf 2
	law 60.
	add pmt
	mul (1
	div (12.
	hlt
	sub (5
	dac bmt
	lai
	jda dpt
	law charac rb
	jda pch
	isp bmt
	jmp .-3
f7,	szf 4 i
	jmp f8
	lac t3	/accidental
	sza i
	jmp nat
	spa
	jmp shp
	cma
	dac t3
	law charac r-
	dac pch
	jmp pds
shp,	law charac r(
	dac pch
pds,	jsp pch+1
	isp t3
	jmp pds
	jmp f8
nat,	law charac r)
	jda pch
f8,	lac i bar
	and (760000
	sza
	stf 2
	lio i bar
	law charac rl
	spi
	jda pch
	ril 1s
	law charac rs
	spi
	jda pch
	ril 2s
	law charac rh
	spi
	jda pch
	ril 1s
	law charac rq
	spi
	jda pch
	rir 2s
lu6,	law charac rc
	spi
	jda pch
                
t                                
	law 177	/calculate duration
	and i bar
	sad ds
	jmp com	/same duration
	dac ds
	lia
	rir 7s
	sni
	hlt
	law 1
	spi
	jmp .+4
	ral 1s
	ril 1s
	jmp .-4
	dac .t1
lu4,	cla
	rcl 1s
	sni
	jmp lu5
	law charac rx
	spi
	law charac r.
	jda pch
	stf 2
	jmp lu4
lu5,	law charac rt
	szf 2 i
	jda pch
	lac t1
	jda dpt
	lio i bar
	lac (add
	ril 2s
	spi
	dac ds	/don't save triplet notes
nx1,	lac pmt
	dac ps	/save pitch
nxn,	idx bar	/get next note
	jmp lup

com,	law charac r,
	jda pch
	jmp nx1

tm,	lac i bar
	sad (nop
	jmp nxn
	jsp sep
	jsp pxx
	text /tempo _/
	law 7777
	and i bar
	jda dpt
	jmp nxn

lu2,	idx bar
	dac nl
nxt,	jsp pxx
	text ./
_.
	idx bl
	law i 1
	adm bc
nx2,	lac i bc
	sas (jmp not
	jmp l8
                
                                 
	jsp pxx
	text /end
_/
	law i 20
	dac cou
	cli
	ppa
	isp cou
	jmp .-2
	lio (13
	ppa
	law i 520
	dac cou
	cli
	ppa
	isp cou
	jmp .-2
	szs 10
	jmp 0
	law i charac rp
	arq
	dsm

rs,	lac bar
	sas nl
	jmp rs1
	lac i brn
	sas (600000
	jmp rs1
	idx brn
	dac nl
	jmp rs2

rs1,	law charac rr
	jda pch
	stf 2
	lio i bar
	ril 2s
	clc
	dac pmt
	jmp lu6

cpy,	lac i bc
	sub nl
	sma
	jmp anm
	lac i bc
	dac bar
	dac t3
	law i 177
	and i bar
	sas (200
	jmp cp1
	idx t3
	lac i t3
	sas (600000
	jmp cp1
	jsp bar+1	/rest
	lac lng
	sas 3u
	jsp uni
	lac bl
	jda dpt
	jsp sep
rs2,	dzm t3
	law i 1
	adm bc
	lac i bc
	sas bar
	jmp .+3
	idx t3
	jmp .-6
	jsp pxx
	text /rest _/
	idx t3
	jda dpt
	clc
	jda pch
	lac t3
	adm bl
	jmp nx2
cp1,	lac bl
	jda dpt
	law 7777
	dac t3
	lac i t3
	sad i bc
	jmp cp2
	law i 1
	adm t3
	sas bc
	jmp .-6
anm,	jsp txx
	text /anomalous measure
_/
	jsp pxx
	text .?????
_.
	jmp l9
cp2,	jsp pxx
	text / copy _/
	lac bl
	sub t3
	add bc
	jda dpt
	jsp sep
                
r                                
cp3,	law i 1
	adm t3
	law i 1
	adm bc
	idx bl
	lac i bc
	sad i t3
	jmp cp3
	law i 1
	add bl
	sub t3
	add bc
	jda dpt
	clc
	jda pch
	jmp nx2

bar,	0	/get size of measure
	dap bax
	dzm .lng
	lac bar
	dap ba1
ba1,	lac .
	and (700000
	sad (600000
bax,	jmp .
	sad (700000
	jmp ba2
	law 177
	and i ba1
	dac pch
	ral 1s
	lio i ba1
	ril 2s
	spi i
	add pch
	adm lng
ba2,	idx ba1
	jmp ba1
                
r                                
uni,	dap unx
	jsp pxx
	text /units _/
	lac lng
	dac .3u
	mul (1
	div (6
	jmp anu
	sni i
	jmp anu
	jda dpt
	clc
	jda pch
unx,	jmp .
anu,	jsp txx
	text /anomalous measure length
_/
	jsp pxx
	text .???_.
	jmp unx-2

sep,	dap sex
	law 75
	sub .chc
	spa
	jmp se1
	cla
	jda pch
sex,	jmp
se1,	jsp pxx
	text /
	_/
	law 10
	dac chc
	jmp sex

stk,	0	/key stored here
	dap stx
	law nt
	dap .+3
	law kt
	dap .+2
	lac .
	dac .
	idx .-2
	idx .-2
	sas (dac kt+50.
	jmp .-5
	lio stk
	sni
	jmp stw	/natural
	clf 2
	spi i
	stf 2	/sharp
	law i 5
	szf 2
	law i 1
	dac t2
	spi
	cmi
	dio csm	/total number
                
o                                
ke3,	lac csm
	sza i
	jmp stw	/done
	lac t2
	dac t1
ke4,	law 7
	adm t1
	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 t2
	sma
	sub (7
	dac t2
	law i 1
	adm csm
	jmp ke3
stw,	law kt
	dap .+3
	law mt
	dap .+2
	lac .
	dac .
	idx .-2
	idx .-2
	sas (dac mt+50.
	jmp .-5
stx,	jmp .

dpt,	0
	dap dpx
	dzm .dp1
dpa,	lac dpt
	dac .dp2
	mul (1
	div .+1
	10.
	sas dp1
	jmp dpa+1
	lai
	sza i
	law 20
	jda pch
	lac dp2
	dac dp1
	sas dpt
	jmp dpa
dpx,	jmp .
                
e                                
er4,	jsp err
	jmp l5

er2,	jsp err
	jmp l35

rin,	dap rix
	dzm cou
	tyi
	lai
	sad (77
	jmp rix-1
	sza i
	jmp er3
	sad (20
	cla
	dac pch
	sub (charac r9
	szm
	jmp er3
	lac cou
	ral 2s
	add cou
	ral 1s
	add pch
	dac cou
	jmp rin+2
	lac cou
rix,	jmp .

er3,	jsp err
	jmp rin+1

er1,	jsp err
	jmp l25

err,	dap erx
	jsp txx
	text .?
_.
erx,	jmp .

pch,	0
	dap pcx
	dio .t2
	idx .chc
	lio pch
	law 2325
	rcr 277
	ral 7s
	and .-2
	dap .+1
	ril .-.
	rar 7s
	rcl 7s
	ppa
	lac pch
	lio .t2
pcx,	jmp .
                
d                                
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

pxx,	dap pxy
	lio i pxy
	idx pxy
	lac (607600
	rcl 6s
	sad (lai
pxy,	jmp .
	sad txy+3
	jmp pxx+1
	jda pch
	jmp pxy-3

consta
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
                
o                                                                                                 
