               job  Radio music, revised
               ctl  6611
     *
     * Play music over an AM radio.
     * This version uses advanced programming and indexing.
     *
               org  87
     x1        dcw  #3
               dc   #2
     x2        dcw  #3
               dc   #2
     x3        dcw  #3
     *
     * Data for the code
     *
               ORG  251
               DCW  001814
               DCW  0803
               DCW  001713
               DCW  0814
               DCW  001621
               DCW  0824
               DCW  001529
               DCW  0834
               DCW  001437
               DCW  0844
               DCW  001363
               DCW  0852
               DCW  001281
               DCW  0861
               DCW  001216
               DCW  0868
               DCW  001143
               DCW  0876
               DCW  001078
               DCW  0883
               DCW  001023
               DCW  0889
               DCW  000959
               DCW  0896
               DCW  000903
               DCW  0902
               DCW  000857
               DCW  0907
               DCW  000811
               DCW  0912
               DCW  000765
               DCW  0917
               DCW  000719
               DCW  0922
               DCW  000683
               DCW  0926
               DCW  000646
               DCW  0930
               DCW  000609
               DCW  0934
               DCW  000572
               DCW  0938
               DCW  000535
               DCW  0942
               DCW  000508
               DCW  0945
               DCW  000480
               DCW  0948
               DCW  000453
               DCW  0951
               DCW  000425
               DCW  0954
               DCW  000407
               DCW  0956
               DCW  000379
               DCW  0959
               DCW  000361
               DCW  0961
               DCW  000342
               DCW  0963
               DCW  000324
               DCW  0965
               DCW  000305
               DCW  0967
               DCW  000287
               DCW  0969
               DCW  000269
               DCW  0971
               DCW  000250
               DCW  0973
               DCW  000241
               DCW  0974
               DCW  000223
               DCW  0976
               DCW  000213
               DCW  0977
               job  Executable code and work areas
     work7     equ  799
               org  978
     work5a    ds   5
               org  995
     work5b    ds   5
     start     sw   1
     rstart    sbr  x1,0
     read      r
               mcw  80,buf&79&x1
               sbr  x1,80&x1
               bce  move1,80,Z
               b    read
     tryb      bss  rstart,b
     move1     sbr  x1,0
     move2     mcw  buf&3&x1,work4
               sbr  x1,4&x1
               mcw  kz6,work5b
               bce  tryb,work4-3,Z
               bce  *&5,work4-3,0
               b    mn
               mcw  work4,work2
               mcw  kz25,work7
               sw   work5b-4
     add       a    work7,work5b
               c    work5b-3,work2
               bu   add
               cw   work5b-4
               b    mkz6
     mn        sbr  x2,0
               mn   work4-2,x2-1
               mn
               mcw  9&x2,x3
               mcw  5&x2,work7
               mcw  work4,work2
               sw   0&x3
     move6     mcw  work5b,work5b
               a    work7,work5a
               c    work5a-4,work2
               bu   move6
               cw   0&x3
     mkz6      mcw  kz6,work5a
               b    move2
     kz6       dcw  000000
     work4     dcw  0000
     work2     dcw  00
     kz25      dcw  000025
     *
     * Song storage
     *
     buf       equ  1400
               end  start
