music player_ 23/8/68 mot=ivk 77 dat=ivk 21 /change stuff at re8 and q1y+7 to calibrate tempo org=20000 /origin of music on drum nbuf=34. /number of drum buffers per field lbuf=120. /size of each size=lbufxnbuf /space taken on each field (4080.) mar=16. /margin after each buffer la2=iot 5077 dimension sec(1) /section number dimension msn(1) /beginning measure number dimension bno(1) /initial block number of file dimension rep(1) /tape word pointer dimension ptb(1000) /tape block table 0/ jmp set /initial entry 3/ jmp . 4, law 600 dap pls /tell control not to play dap tys /tell it to type gtc, lio (sct /read in control section dia lio (i enm-sct gts, law sct dcc hlt jmp sct set, lio (i dia cli>>05< /start tape cma sub (5 spq cmi /too close, go away from it srt, law 4 /IO + to go forward, - for reverse spi i cma adm bkn /accelerate distance sre, spi i mot 600 /fwd spi mot 700 /rev mot 400 /go stf 6 clf 4 spi i stf 4 /direction flag try, lac trb /try reading it dat 4500 /read dat 300 /get status spi jmp m16 /wrong block ril 2s spi jmp mtl /block timing error ril 1s spi jmp mtl /end of tape rir 2s dac bkn /actual block number spi trx, jmp . /transfer finished cla>>05<>05<>76<< lkp, 0 /look up name dzm .flv dac .dlp aam add dlp dac .dz idx dlp q, dap dq sub dz sma jmp z /directory ran out stf 6 stf 5 ZX a, law i 3 dac .c lac i tex dq, lio i . SXX| b, lac .t ral 6s dac t ril 6s and (77 sad (77 clf 5 /typed string ran out law 77 A^IA sad (77 jmp d /directory entry ran out xor t and (77 sza>>05<>05<>05<>05<>05<>37<< /read and pack symbol res, 0 clf 7 ZX dzm num lu0, law i 3 dac c lu1, clf 1 szf i 1 jmp .-1 tyi lai sad (40 jmp in /cancel sad (36 cla dac ca /space, comma, c.r., or symbol sas (33 sza i law 77 dac cb /c.r. or symbol sad (77 jmp lu4 sad (charac r0 cla lia lac num ral 2s add num ral 1s A+IA dac num stf 5 lu4, lio i tex lac cb rar 6s rcl 6s dio i tex isp c jmp lu3 SXXA dac poi sad (20 hlt /text buffer overflow law 77 sas cb jmp lu0 jmp i res lu3, law 77 sas cb jmp lu1 jmp lu4 >>52<< pt, /prototype pitch table /twelfth root of 2 = 1.059463094359295264581 0 2147 2252 2361 2474 2614 2740 3072 3231 3375 3547 3730 4120 4316 4524 4742 5171 5430 5701 6164 6461 6772 7317 7660 10237 10634 11250 11704 12361 13060 13602 14350 15143 15764 16636 17541 20476 21470 22521 23611 24742 26140 27404 30717 32305 33751 35474 37301 41175 43161 45241 47421 51705 54300 57007 61636 64613 67721 73170 76603 102372 106342 112502 117042 pt+100, cmt, cme-cmt text /load/ 7777 jmp loa text /append/ -0 jmp app text /play/ 7777 jmp pla text /go/ 77 jmp go text /wait/ 7777 jmp wai text /tempo/ 77 jmp tem text /tune/ 7777 jmp tun text /untape/ -0 jmp unt text /tape/ 7777 jmp tap cme, constants variables enm, /end of control section n /compiler section offset enm-sct dimension bf2(lbuf) /drum buffer dimension off(1) /measure offset dimension nl(1) /packing pointer dimension ij(1) /part number dimension np(1) /number of parts dimension ct(1) /word count dimension tm3(1) /tempo information dimension b1(4) /bar pointers dimension n1(4) /note pointers dimension t1(4) /time left in this note dimension p1(4) /pitch dimension f1(4) /articulation flag (- when part runs out) dimension a1(4) /articulation time sct/ eem iam law i 2 /read back last buffer adm op law 7777 and dp lia dia xor dp ior (lbuf lia law bf2 dcc hlt gns, dzm ij /compile one section law not dac nl clf 7 /initialize tape gnp, jdp gwd /read one part spa jda er /no more parts cma dac ct law 4 sad ij jmp tm /too many parts clf 2 /goes on when bars begin lac nl dac off /note offset re1, jdp gwd szf 2 add off /relocate sza i jmp re6 /note/bar marker aam dac nl idx nl sad (77400 jmp sf /storage full sad (20000 lac (70000 dac nl jmp .+2 re6, stf 2 isp ct jmp re1 lxr ij /end of part law i 1 add nl dac i b1 idx ij jmp gnp er, 0 mot 500 /stop tape lac sec TAAM sub (1 dac sec cma>>05<>76<< q1x, jmp l /l jmp s /s nop /e ral 1s /h ral 2s /q jmp svl /set volume jmp q13 /end of bar, can't get any time jmp q1y /set tempo q1y, law 1777 /set new tempo and po1 dac po1 sub (20. CAA>P cla adm po1 law 6 lio (35440 div tm2 hlt cli scr 9s div po1 hlt dac tm3 q1z, idx i n1 sad (and lac (law dac i n1 jmp gnn s, ral 2s add temp jmp e svl, lac sfl ior (ral dac sv1 add (rar-ral dac sv2 lac vol1 rar 8s sv1, xx lio temp rcr 2s sv2, xx rar 8s dac vol1 jmp q1z >>60<< q14, dzm i p1 lac i a1 adm i t1 dzm i f1 jmp q15 q13, lac i t1 sza i jmp .+3 /no time stf 5 /F5 means some part has time jmp q77+1 lac i f1 spa jmp q77 /end of part already noted lac ij dac .ps /some part is short q77, dzm i p1 /if no time, make it a rest lac sfl ral 2s add (2s dac sfl /sfl=2s,4s,6s,8s idx ij sas np jmp q10 /check next part szf 5 i jmp q8 /no time in any part lac .ps sma jmp mis /some part is short / q99, lac t1 /calculate least time sza i law 7777 lio t1+1 sni jmp .+5 sub t1+1 sma cla add t1+1 lio t1+2 sni jmp .+5 sub t1+2 sma cla add t1+2 lio t1+3 sni jmp .+5 sub t1+3 sma cla add t1+3 dac temp cma>>05<>05<>16<< /player dimension buf(lbuf+mar) offset enm+enc-2xsct sct/ lem nam law brk dap 3 jmp pl1 brk, cks ril 5s spi i jmp dsb lio mpa dia lio mpf law buf dcc hlt law i lbuf adm ptr law 7777 and 1 sub (saf spa jmp .+3 /not safe to bump XR law 15. X+AX lac i p11 ral 4s adm t11 lac i p22 ral 4s adm t22 lac i p33 ral 4s adm t33 lac 2 ral 4s adm t44 dsb, lac 0 lio 2 jmp i 1 ) pl1, cli>>05< jmp p00 nxm, idx ptr sas (lxr buf+lbuf jmp ptr lai ral 1s adm t44 iot 114 law lbuf adm mpa sas (size jmp nx2 dzm mpa lac (i adm mpf e nx3, lac i p11 ral 1s adm t11 iot 14 lac i p22 ral 1s adm t22 iot 314 lac i p33 ral 1s adm t33 iot 214 law i 15. add mpa lia dba xct p44 jmp ptr nx2, nop nop jmp nx3 fin, lsm szs 60 jmp pl1 law 3 dap 3 law 600 dap pls cla jmp gtc-1 /return to control section .>>05<<1/ t11, 0 t22, 0 t33, 0 t44, 0 repeat ifn p22^1,[printx /try again /] constants enp, variables start 0 g