                       OMNIPOTENT Music Playing Program Mk Ia    64-03-29, prs.

	ncores=4

dimension h(50)

define feed n
	law i n
	jda fee
	termin

define punbin
	jda pbw
	termin

	jmp dun
cos,	0
	dap six
	lac cos
	add (200000
	dac sin
	jmp sin+3

sin,	0
	dap six
	lac sin
	spa
	jmp si1
	lio (opr

si3,	dio si4
	ral 1s
	spa
	cma

si0,	dac sin
	mul sin
	dac s.i2
	law 436
	mul s.i2
	add (12131
	mul s.i2
	sub (122533
	mul s.i2
	add (311037
	mul sin
	scl 1s
si4,	xx
six,	jmp

si1,	cma
	lio .-1
	jmp si3
          
                                                                  sqr,	0
	dap sqx
	law i 17.
	dac sq.c
	dzm sq.q
	dzm sq.m
	lac sqr
	spa
	jmp sqx
	rcl 1s
	jmp .+2

sq1,	lac sq.a
	rcl 2s
	dac sq.a
	dio sq.i
	law 3
	and sq.i
	add sq.m
	sub sq.q
	sub sq.q
	spq
	jmp sq2
	sub (1
	sal 2s
	dac sq.m
	law 1

sq3,	add sq.q
	adm sq.q
	isp sq.c
	jmp sq1
	lac sq.q
sqx,	jmp

sq2,	add sq.q
	add sq.q
	dac sq.m
	cla
	jmp sq3
          
                                                                 xp,	jsp rn
	jda cc
	jmp xp	/error
	rar 6s
	dac p.p
	clf 1

pl,	law 400
	adm p.ph
	lio i p.p
	rcr 9s
	rcr 9s
	dpy-i
	lat
	adm p.pd
	dap p.p
	szf i 1
	jmp pl
	jmp re

cc,	0
	dap ccx
	lac cc
	sza i
	jmp ccr
	sub (ncores
	sma
	jmp ccr
	idx ccx
	lac cc
ccx,	jmp

ccr,	lac (357421
	jda txs
	law 7234
	jda txs
	jmp ccx

txs,	0
	dap tsx
	law i 3
	dac ts.v

ts2,	lac txs
	ral 6s
	dac txs
	sza i
	jmp ts1
	rcl 9s
	rcl 9s
	tyo

ts1,	isp ts.v
	jmp ts2
tsx,	jmp
          
                                                                 fee,	0
	dap fex
	cli

fe2,	ppa
	isp fee
	jmp .-2
fex,	jmp

fe1,	0
	dap fex
	lac fe1
	dac fee
	jmp fe2


pbw,	0
	dap pbx
	lio pbw
	ppb
	repeat 2	ril 6s	ppb
	lac pbw
	adm p.oc
	lac pbw
pbx,	jmp


xs,	jsp rn
	dac .msf
	stf 6

r1,	lio (77
	tyo
	jmp r

xu,	clf 6
	jmp r1


xcc,	jsp rn	/copy core
	jda cc
	jmp xcc
	rar 6s
	dac .cdp
	lac .odp
	dac .ndp

cx1,	lac i .cdp
	dac i .ndp
	idx .cdp
	adm m.ys
	idx .ndp
	sas .edp
	jmp cx1
	jmp r1
          
                                                                 xc,	jsp rn
	jda cc
	jmp xc
	dac .n
	rar 6s
	dac .odp
	add (i
	dac .edp
	adm m.ys
	law h
	dap xcn

xc2,	lio (77
	tyo
	lac (357034
	jda txs

xc3,	jsp rnl
	jmp xcn	/if number
	sad (63
	jmp xcc	/if c
	sad (51
	jmp xcr	/if r
	lio (75
	tyo
	lio (21
	sad (21
	lio (20
	tyo
	jmp xc3


xr1,	rpb
xcr,	rpb
	spi i
	jmp xr1
	law h
	dap xd

xrr,	rpb
	spi
	jmp gt
	dio .xr2
	rpb
	dio .xr3
	lac .xr2
	sub .xr3
	dac .xr2	/w.c.
	add .xr3
	adm .xr3	/cksum
xd0,	rpb
	dio i xd
          
                                                                 xd,	lac
	adm .xr3
	idx xd
	isp .xr2
	jmp xd0
	rpb
	dio .xr2
	lac .xr3
	sas .xr2
	hlt
	jmp xrr


xcn,	dac
	sza i
	jmp gt
	idx xcn
	lac (356134
	jda txs
	jsp rn
	xct xcn
	idx xcn
	jmp xc2


r,	clf 1
	szf i 1
	jmp .-1

re,	tyi
	dio .ch
	lac .ch
	sad (30
	jmp rdi	/y
	sad (22
	jmp xs	/s
	sad (24
	jmp xu	/u
	sad (63
	jmp xc	/c
	sad (47
	jmp xp	/p
	sad (23
	jmp xt	/t
	sad (77
	jmp r	/c.r.
	cli
	tyo

r00,	adm m.ys
	jsp rch
	sas (77
	jmp r00
	jmp r
          
                                                                 rn,	dap rnx
rn0,	dzm rn.m
rn1,	jsp rch
	sza i
	jmp rny
	sad (21
	jmp rn0
	sad (20
	cla
	dac rn.n
	sub (12
	sma
	jmp rn1

rn3,	lac rn.m
	ral 2s
	add rn.m
	ral 1s
	add rn.n
	dac rn.m
	adm m.ys
	jmp rn1

rnl,	dap rnx
r10,	dzm rn.m
r11,	jsp rch
	sad (21
	jmp r10
	sza i
	jmp rny
	sad (20
	cla
	dac rn.n
	sub (12
	sma
	jmp rxr
	lac rn.m
	ral 2s
	add rn.m
	ral 1s
	add rn.n
	dac rn.m
	jmp r11

rxr,	idx rnx
	lac rn.n
	jmp rnx
          
                                                                 
rch,	dap rhx
	clf 1
	szf i 1
	jmp .-1
	tyi
	dio .rhh
	lac .rhh
rhx,	jmp


rny,	lac rn.m
rnx,	jmp


sh,	dap shx
	law h
	dap gg
	dzm ss.q
	dzm .nhr

gg,	lac
	sza i
	jmp gg1
	idx .nhr
	idx gg
	xct gg
	dac te.m
	mul te.m
	scr 1s
	rcr 9s
	rcr 9s
	adm ss.q
	idx gg
	jmp gg

gg1,	lac .ssq
	cli
	jda sqr
	dac .qsq
	adm m.ys
	lac (400
	szf 6
	lac .msf
	cli
	div .qsq
	hlt 17
	dac .gsf

shx,	jmp
          
                                                                 gt,	jsp sh
	lac .nhr
	cma
	dac nh.c
	lac .odp
	dac d.p
	dzm i d.p
	idx d.p
	sas .edp
	jmp .-3
w,	dzm .inc
	dzm h.n

fhh,	idx h.n
	law 100
	adm .inc

fh,	law h-2
	dap fh1

fh0,	idx fh1
	idx fh1

fh1,	lac
	sza i
	jmp fhh
	sas h.n
	jmp fh0
	idx fh1
	xct fh1
	mul .gsf
	rcr 4s
	dio .sf
	idx fh1

          
                                                                 go,	dzm .s
	lac .odp
	dac d.p
	jmp is1

is,	lac .inc
	adm .s

is1,	lac .s
	jda sin
	mul .sf
	adm i d.p
	idx d.p
	sas .edp
	jmp is
	isp .nhc
	jmp fhh
	jmp r1

xt,	feed 15.

xtc,	jsp sh
	lac (jmp 7751
	punbin
	feed 5
	dzm p.oc
	law h
	dap po1
	punbin
	lac nh.r
	ral 1s
	add (h+1
	punbin

po1,	lac
	punbin
	sza i
	jmp po2
	idx po1
	xct po1
	punbin
	idx po1
	jmp po1
          
                                                                 po2,	lac p.oc
	punbin
	feed 10.
	lac (hlt
	punbin
	feed 150.
	jmp r1



define h1 n
	cla
	rcl 6s
	add (tab
	dap pp'n
	termin

define h2 n
	lac i pp'n
	ral 1s
	adm .c'n
	termin

define h3 n
pp'n,	lac	adm .c'n	dap p'n
termin

adm=360000

top=7700	bot=1700	dew=7400

define corr
	h2 1
	h2 2
	h2 3
	h2 4
	termin
          
                                                                 lz=.
3/	jmp lz
lz/	eem
	cks
	ril 1s
	spi i
	jmp ds
	rrb
rb,	jmp

rd,	rpb-i
rd1,	dap rb
	corr
	repeat 8.,lac i
	opr
ds,	lac 0
	lio 2
	jmp i 1

rm,	jsp rd
	spi
	jmp rp1
	dio .cc1	/fa
	jsp rd
	dio .cc2	/la+1
	lac .cc1
	sub .cc2
	dac .cc1	/-n
	add .cc2
	adm .cc2	/cksum

rr,	jsp rd
rr1,	dio i rp
rp,	lac
	adm .cc2
	idx rp
	sad (lac top
	jmp rp1
rx,	isp .cc1
	jmp rr
	jsp rd	/cksm
rx1,	dio .cc1
	lac .cc2
	sas .cc1
	hlt
	jmp rm

rp1,	law bot
	dap rp
	law 7777
	and 1
	sas (ddl
	jmp rp2
	law x
	dap 1
	law bot
	dap x
          
                                                                 rp2,	jsp rd1
	isp .cc1
	jmp rr1
	jmp rx1

x1,	idx x
x,	lac	/time
	sma
	jmp dun
	dac .n
	idx x
	lio i x
	h1 1
	h1 2
	h1 3
	
sw,	idx x	/or jmp sw1
	sad (lac dew-1
	rpb-i
	lio i x
	sad (lac top-1
	jmp sw2
sw3,	h1 4

mm,	corr

tpo,	lat
	ral 1s
	adm .n
	repeat 2, lac i
	lac
	lio c.1


h3 1	h3 2	h3 3	h3 4

	lac i p1
	add i p2
	add i p3
	add i p4
	dpy-i
	lat
	adm .n
	spa
	jmp pp1
	jmp x1

p1,	i
print .pointers begin here.
p2,	and
p3,	and i
p4,	i


sw2,	law bot-1
	dap x
	jmp sw3
          
                                                                 sw1,	law (0
	dap pp4
	lac i
	lac i
	jmp mm


dun,	clf 7
	eem
	lsm
	lac (jmp r1
	dac 7751
	jmp r1

rdi,	cbs
	esm
	law bot
	dap rp
	law rm 1
	dap rb
	rpb-i

ddl,	jmp .

tab,	0	0
	40	42	44	46	50
	53	55	60	63	66
	71	74	100	104	110
	114	121	125	133	140
	146	154	162	171	200
	210	220	230	241	253
	265	300	313	327	344
	362	400	417	437	460
	503	526	552	600	626
	657	710	743	1000	1036
	1077	1141	1205	1253	1324
	1377	1455	1535	1620	1707
	2000	1

	variab
const,	consta

start dun
          
                                                                          
                                                                                                                               

