C64 Software  <  SCA: The C64 Software Collection / NMIPLAYER.S

  Run
1000              ORG $4700
1010              ;
1020 SOUND1       EQU 57344
1030 SOUND2       EQU 57362
1040 ZSAVE        EQU $C600
1050              ;
1060              ;
1070              JMP SOUNDON
1080              JMP SOUNDOFF
1090 SOUNDNR      DFB 0
1100              ;
1110 SOUNDON      SEI
1120              LDX #220
1130 COPY         LDA 0,X
1140              STA ZSAVE,X
1150              INX
1160              BNE COPY
1170              ;
1180              LDX #53
1190              STX 1
1200              LDA SOUNDNR
1210              JSR SOUND1
1220              LDX #55
1230              STX 1
1240              ;
1250 Q1           LDA 53265
1260              BPL Q1
1270              LDA #10
1280 Q2           CMP 53266
1290              BNE Q2
1300              ;
1310              LDA #199
1320              STA $DD04 ; TALO
1330              LDA #76
1340              STA $DD05 ; TAHI
1350              LDA #<NMI
1360              STA 792
1370              LDA #>NMI
1380              STA 793
1390              LDA #129
1400              STA $DD0D
1410              LDA #$11
1420              STA $DD0E
1430              CLI
1440              RTS
1450              ;
1460              ;
1470 SOUNDOFF     LDA #127
1480              STA $DD0D
1490              LDA #0
1500              STA 54296
1510              RTS
1520              ;
1530              ;
1540 NMI          PHA
1550              TXA
1560              PHA
1570              TYA
1580              PHA
1590              ;INC 53280
1600              JSR ZTAUSCH
1610              LDA 1
1620              PHA
1630              LDA $DD0D
1640              LDA #53
1650              STA 1
1660              JSR SOUND2
1670              PLA
1680              STA 1
1690              JSR ZTAUSCH
1700              ;DEC 53280
1710              PLA
1720              TAY
1730              PLA
1740              TAX
1750              PLA
1760              RTI
1770              ;
1780              ;
1790 ZTAUSCH      LDX #220
1800 TAUSCH       LDY 0,X
1810              LDA ZSAVE,X
1820              STA 0,X
1830              TYA
1840              STA ZSAVE,X
1850              INX
1860              BNE TAUSCH
1870              RTS
READY.