1000 *=$0600
1010 PHA
1020 TXA
1030 PHA
1040 LDX CURRENT
1050 INC CURRENT
1060 LDA CURB,X
1070 STA WSYNC
1080 STA $D018
1090 LDA LINE,X
1100 STA $D017
1110 LDA #$B6
1120 STA $D01A
1130 CPX #24
1140 BNE EXIT
1150 LDX #$00
1160 STX CURRENT
1170 EXIT
1180 PLA
1190 TAX
1200 PLA
1210 RTI
1220 ;
1230 CURB *=*+30
1240 LINE *=*+30
1250 ;
1260 CURRENT = $CB
1270 WSYNC = $D40A
1280 ;
1290 MOVERIGHT
1300 ;
1310 PLA
1320 LDA #$00
1330 STA $D4
1340 STA $D5 |
1350 LDA RIGHTS
1360 CMP #$08
1370 BEQ EXIT1
1371 LDA #$08
1372 STA $D4
1380 INC RIGHTS
1390 DEC LEFTS
1400 LDA 560
1410 STA $CC
1420 LDA 561
1430 STA $CD
1440 LDY #15
1450 LOOP LDA ($CC),Y
1460 CLC
1470 ADC #$01
1480 STA ($CC),Y
1490 BCC SKIP
1500 INY
1510 LDA ($CC),Y
1520 CLC
1530 ADC #$01
1540 STA ($CC),Y
1550 DEY
1560 SKIP INY
1570 INY
1580 INY
1590 CPY #96
1600 BMI LOOP
1610 EXIT1 RTS
1620 ;
1630 MOVELEFT
1640 ;
1650 PLA
1651 LDA #$00
1652 STA $D4 |
1653 STA $D5
1660 LDA LEFTS
1670 CMP #$08
1680 BEQ EXIT2
1681 LDA #$08
1682 STA $D4
1690 INC LEFTS
1700 DEC RIGHTS
1710 LDA 560
1720 STA $CC
1730 LDA 561
1740 STA $CD
1750 LDY #15
1760 LOOP2 LDA ($CC),Y
1770 SEC
1780 SBC #$01
1790 STA ($CC),Y
1800 BCS SKIP2
1810 INY
1820 LDA ($CC),Y
1830 SEC
1840 SBC #$01
1850 STA ($CC),Y
1860 DEY
1870 SKIP2 INY
1880 INY
1890 INY
1900 CPY #96
1910 BMI LOOP2
1920 EXIT2 RTS
1930 ;
1940 RIGHTS = $CE
1950 LEFTS = $CF
|