C64 Software  <  SCA: The C64 Software Collection / SPRITESCROLL2

  Run
1000              ;
1010              ;NORMALSCROLL 2
1020              ;27.8.87   STI
1030              ;
1040 Y            EQU 90   ;POSITION
1050 IY           EQU 225  ;WANN IRQ
1060 C            EQU 4    ;SPRITEFARBE
1070 EY           EQU 255  ;EXPAND Y
1080 ROW          EQU 250
1090 SPEED        EQU 251
1100 TEXT         EQU 252
1110 PTR1         EQU 254
1120              ;
1130 SPRITEPTR    EQU 2040
1140 SPRITENR     EQU 128
1150 SPRITES      EQU 8192
1160 REG          EQU 53270
1170              ;
1180              ORG 20000
1190              ;
1200              ;
1210 INT          SEI
1220              LDA #<ISR
1230              STA 788
1240              LDA #>ISR
1250              STA 789
1260              LDA #127
1270              STA 56333
1280              ;
1290              LDX #46
1300 INIT1        LDA VICTAB,X
1310              STA 53248,X
1320              DEX
1330              BPL INIT1
1340              ;
1350              LDX #8
1360              LDA #SPRITENR+7
1370 INIT2        STA SPRITEPTR-1,X
1380              SEC
1390              SBC #1
1400              DEX
1410              BNE INIT2
1420              ;
1430              TXA
1440 INIT3        STA SPRITES,X
1450              STA SPRITES+256,X
1460              STA SPRITES+512,X
1470              INX
1480              BNE INIT3
1490              ;
1500              LDA #<TEXTTAB
1510              STA TEXT
1520              LDA #>TEXTTAB
1530              STA TEXT+1
1540              ;
1550              LDA #2
1560              STA SPEED
1570              CLI
1580              RTS
1590              ;
1600              ;
1610              ;
1620 ISR          LDA #1
1630              STA 53273
1640              ;
1650              INC 53280
1660              LDA SPEED
1670 ISR1         PHA
1680              JSR SCLOLL
1690              PLA
1700              TAX
1710              DEX
1720              TXA
1730              BNE ISR1
1740              ;
1750              DEC 53280
1760              JMP 59953
1770              ;
1780 SCLOLL       DEC 53248+14
1790              DEC 53248+12
1800              DEC 53248+10
1810              DEC 53248+8
1820              DEC 53248+6
1830              DEC 53248+4
1840              DEC 53248+2
1850              DEC 53248
1851              LDA 53248
1852              CMP #16
1860              BEQ SWEITER
1870              RTS
1880              ;
1890 SWEITER      LDY #7
1900              LDX #0
1910 PLUSACHT     LDA 53248,X
1920              CLC
1930              ADC #16
1940              STA 53248,X
1950              INX
1960              INX
1970              DEY
1980              BPL PLUSACHT
1990              ;
2000              LDA #7
2010              STA ROW
2020              LDA #<SPRITES
2030              STA PTR1
2040              LDA #>SPRITES
2050              STA PTR1+1
2060              ;
2070 SCLOLL1      LDX #22
2080              LDY #1
2090 SCLOLL2      LDA (PTR1),Y
2100              DEY
2110              STA (PTR1),Y
2120              INY
2130              INY
2140              DEX
2150              BPL SCLOLL2
2160              ;
2170              LDY #64
2180              LDX #8
2190 SCLOLL3      LDA (PTR1),Y
2200              PHA
2210              TYA
2220              SEC
2230              SBC #62
2240              TAY
2250              PLA
2260              STA (PTR1),Y
2270              TYA
2280              CLC
2290              ADC #65
2300              TAY
2310              DEX
2320              BNE SCLOLL3
2330              ;
2340              LDA PTR1
2350              CLC
2360              ADC #64
2370              STA PTR1
2380              BCC SCLOLL4
2390              INC PTR1+1
2400              ;
2410 SCLOLL4      DEC ROW
2420              BNE SCLOLL1
2430              ;
2440              LDA #0
2450              STA PTR1
2460              LDA #27    ;$D8/8
2470              STA PTR1+1
2480              ;
2490              LDY #0
2500 SCLOLLT1     LDA (TEXT),Y
2510              BNE SCLOLL5
2520              ;
2530              LDA #<TEXTTAB
2540              STA TEXT
2550              LDA #>TEXTTAB
2560              STA TEXT+1
2570              BNE SCLOLLT1
2580              ;
2590 SCLOLL5      INC TEXT
2600              BNE SCLOLL6
2610              INC TEXT+1
2620              ;
2630 SCLOLL6      ASL
2640              ROL PTR1+1
2650              ASL
2660              ROL PTR1+1
2670              ASL
2680              ROL PTR1+1
2690              STA PTR1
2700              LDA #51
2710              STA 1
2720              LDX #0
2730              LDY #0
2740 SCLOLL7      LDA (PTR1),Y
2750              STA SPRITES+386,X
2760              INX
2770              INX
2780              INX
2790              INY
2800              CPY #8
2810              BCC SCLOLL7
2820              LDA #55
2830              STA 1
2840              ;
2850 SCLOLLAUS    RTS
2860              ;
2870              ;
2880              ;
2890              ;VICTAB       DFB 16,Y,64,Y,112,Y,160,Y,208,Y,0,Y,48,Y,96,Y,%11000000
2891 VICTAB       DFB 32,Y,80,Y,128,Y,176,Y,224,Y,16,Y,64,Y,112,Y,%11100000
2900              DFB 27,IY,0,0,255,8,EY,21,1,129,0,0,255,0,0
2910              DFB 0,0,0,0,0,0,0,C,C,C,C,C,C,C,C
2920              ;
2930 TEXTTAB      DFB ""
2940              DFB ""
2950              DFB ""
2960              DFB "",0
READY.