C64 Software  <  SCA: The C64 Software Collection / SOUNDPLAYER.S1

  Run
1000              ;
1010              ;SOUNDPLAYER
1020              ;
1030              ORG $5000
1040              ;
1050 SOUNDFLAG    EQU 2
1060              ;
1070 ANFANG       SEI
1080              LDA #<MAIN
1090              STA 788
1100              LDA #>MAIN
1110              STA 789
1120              LDA #127
1130              STA 56333
1140              LDA #100 ; RASTER
1150              STA 53266
1160              LDA #27
1170              STA 53265
1180              LDA #129
1190              STA 53274
1200              JSR $4022
1210              CLI
1220              ;
1230 NEUSOUND     JSR 65508
1240              BEQ END
1250              SEC
1260              SBC #49 ; '1' -> #0
1270              CMP #7
1280              BPL END
1290              JSR COPYSOUND
1300 END          JMP NEUSOUND
1310              ;
1320              ;
1330 COPYSOUND    SEI
1340              LDX #$34
1350              STX 1
1360              LDX #1
1370              STX SOUNDFLAG
1380              ASL
1390              ASL
1400              ASL
1410              ASL
1420              CLC
1430              ADC #$90 ; 1.SOUND
1440              STA 253
1450              LDY #0
1460              STY 252
1470              STY 254
1480              LDX #$40
1490              STX 255
1500              LDX #16
1510 COPY         LDA (252),Y
1520              STA (254),Y
1530              INY
1540              BNE COPY
1550              INC 253
1560              INC 255
1570              DEX
1580              BNE COPY
1590              LDX #$37
1600              STX 1
1610              LDX #$17
1620              LDA #0
1630 SIDRESET     STA $D400,X
1640              DEX
1650              BNE SIDRESET
1660              STY SOUNDFLAG
1670              CLI
1680              RTS
1690              ;
1700              ;
1710              ;
1720 MAIN         LDA #1
1730              STA 53273
1740              INC 53280
1750              LDA SOUNDFLAG
1760              BNE NOSOUND
1770              JSR $4002
1780 NOSOUND      DEC 53280
1790              JMP $EA31
1800              PLA
1810              TAY
1820              PLA
1830              TAX
1840              PLA
1850              RTI
1860              ;
1870              ;
1880              ;
READY.