1000 ORG 20000
1010 SEI
1020 LDA #54
1030 STA 1
1040 JMP $AA00
1050 ;
1060 ORG $AA00
1070 ZEROFREE EQU 80
1080 SCOLLBTS EQU ZEROFREE
1090 SCOLLSPEED EQU ZEROFREE+1
1100 TEXT EQU ZEROFREE+2
1110 ACTUAL EQU ZEROFREE+4
1120 RRKIND EQU ZEROFREE+5
1130 SOLLSBLINKEN EQU ZEROFREE+6
1140 BLINKA EQU ZEROFREE+7
1150 COUNTER EQU ZEROFREE+8
1160 ;
1170 DISCARD EQU 2066 ;NICHT 2064!
1180 ;
1190 SOUNDINIT EQU $3009
1200 SOUND2 EQU $300F
1210 ;
1220 BILDSCHIRM EQU $2400
1230 SCOLLADR EQU BILDSCHIRM+320
1240 CHAR EQU $2000
1250 FARBWURST EQU 828
1260 ;
1270 ;
1280 ;
1290 INIT LDA #0
1300 STA 53280
1310 STA 646
1320 JSR $E544
1330 ;
1340 LDA #127
1350 STA 56333
1360 SEI
1370 LDX #<INTERRUPT
1380 LDY #>INTERRUPT
1390 STX 788
1400 STY 789
1410 LDX #$64
1420 LDY #$3E
1430 STX 792
1440 STY 793
1450 ;
1460 LDA #20
1470 STA 53266
1480 LDA #91
1490 STA 53265
1500 LDA #129
1510 STA 53274
1520 LDA #152
1530 STA 53272
1540 STA 657
1550 STA 650
1560 ;
1570 LDA #1
1580 STA COUNTER
1590 LDA #6
1600 STA ACTUAL
1610 ;
1620 LDA #1
1630 STA SCOLLSPEED
1640 STA BLINKA
1650 STA SOLLSBLINKEN
1660 JSR DOSCOINIT
1670 JSR SOUNDINIT
1680 LDA #1
1690 STA 53273
1700 CLI
1710 ;
1720 ;
1730 INPUT LDX 56321
1740 INX
1750 BEQ INPUT
1760 ;
1770 SEI
1780 LDY #127
1790 STY $DD0D ;DISABLE
1800 INY
1810 STY $DD0E ;TIMER A
1820 LDX #0
1830 STX 53274 ;RASTER OFF
1840 STX 54296 ;VOL OFF
1850 STX 53265 ;PIC OFF
1860 INX
1870 STX 53273 ;REQ OFF
1880 INY
1890 STY 56333 ;TIMER ON
1900 ;
1910 LDA #$34
1920 STA 1
1930 LDY #0
1940 STY 252
1950 STY 254
1960 LDA #$C0
1970 STA 253
1980 LDA #$20
1990 STA 255
2000 LDX #32
2010 SHYB LDA (252),Y
2020 STA (254),Y
2030 INC 1
2040 INC 53280
2050 DEC 1
2060 INY
2070 BNE SHYB
2080 INC 253
2090 INC 255
2100 DEX
2110 BNE SHYB
2120 ;
2130 TXS ;CLR STACK
2140 LDA #54 ;KERNEL ON
2150 STA 1
2160 JSR $FD15 ;VECS INIT
2170 JMP DISCARD
2180 ;
2190 ;
2200 INTERRUPT LDA #1
2210 STA 53273
2220 ;
2230 LDX #49
2240 LDY #49
2250 MAIN LDA FARBWURST,Y
2260 ;
2270 WARTEN CPX 53266
2280 BCS WARTEN
2290 ;
2300 STA 53281
2310 INX
2320 DEY
2330 BPL MAIN
2340 JSR SCOLL
2350 JSR BLINKER
2360 JSR CYCLE
2370 JSR SOUND2
2380 JMP $EA31
2390 ;
2400 ;
2410 CYCLE DEC COUNTER
2420 BEQ CYCLEJA
2430 RTS
2440 ;
2450 CYCLEJA LDA #2
2460 STA COUNTER
2470 ;
2480 LDY #1
2490 LDX FARBDAT+1
2500 CYCLE1 LDA FARBDAT+1,Y
2510 STA FARBDAT,Y
2520 STA FARBWURST,Y
2530 INY
2540 CPY #62
2550 BNE CYCLE1
2560 STX FARBDAT+62
2570 ;
2580 ;
2590 FARBRAUF LDA ACTUAL
2600 NORMAL LDY #13
2610 JSR CONTROUL
2620 LOS LDA FARBLINE,Y
2630 PHA
2640 TYA
2650 CLC
2660 ADC ACTUAL
2670 TAX
2680 PLA
2690 STA FARBWURST-9,X
2700 DEY
2710 BPL LOS
2720 RTS
2730 ;
2740 CONTROUL LDA RRKIND
2750 AND #1
2760 BEQ HINAB
2770 INC ACTUAL
2780 INC ACTUAL
2790 LDA ACTUAL
2800 CMP #60
2810 BEQ RUNTERMACH
2820 RTS
2830 RUNTERMACH INC RRKIND
2840 RTS
2850 ;
2860 HINAB DEC ACTUAL
2870 DEC ACTUAL
2880 BEQ RAUFMACH
2890 RTS
2900 RAUFMACH DEC RRKIND
2910 RTS
2920 ;
2930 ;
2940 SCOLL LDA #112
2950 STA 53281
2960 LDX SCOLLBTS
2970 SCOLL0 CMP 53266
2980 BCS SCOLL0
2990 STX 53270
3000 NOP
3010 LDA #1
3020 STA 53281
3030 ;
3040 SCOLL1 LDA 53266
3050 CMP #124
3060 BCC SCOLL1
3070 LDA #200
3080 STA 53270
3090 ;
3100 LDA SCOLLSPEED
3110 SCOLL2 PHA
3120 JSR SCOLLIT
3130 PLA
3140 SEC
3150 SBC #1
3160 BNE SCOLL2
3170 ;
3180 RTS
3190 ;
3200 ;
3210 SCOLLIT DEC SCOLLBTS
3220 BMI DOSCOLLIT
3230 RTS
3240 ;
3250 DOSCOLLIT LDA #7
3260 STA SCOLLBTS
3270 ;
3280 LDX #0
3290 DOSCO1 LDA SCOLLADR+1,X
3300 STA SCOLLADR,X
3310 INX
3320 CPX #39
3330 BNE DOSCO1
3340 ;
3350 DOSCO2 LDY #0
3360 LDA (TEXT),Y
3370 BNE DOSCO3
3380 ;
3390 DOSCOINIT LDA #<TEXTTAB
3400 STA TEXT
3410 LDA #>TEXTTAB
3420 STA TEXT+1
3430 BNE DOSCO2
3440 ;
3450 DOSCO3 INC TEXT
3460 BNE DOSCO4
3470 INC TEXT+1
3480 ;
3490 DOSCO4 CMP #245
3500 BCC DOSCO5
3510 ;
3520 SEC
3530 SBC #244
3540 STA SCOLLSPEED
3550 JMP DOSCO2
3560 ;
3570 DOSCO5 STA SCOLLADR+39
3580 RTS
3590 ;
3600 BLINKER DEC SOLLSBLINKEN
3610 BEQ BLINK
3620 RTS
3630 BLINK LDA #4
3640 STA SOLLSBLINKEN
3650 LDX BLINKA
3660 LDA COLA,X
3670 STA 53282
3680 LDA COLB,X
3690 STA 53283
3700 LDA COLC,X
3710 STA 53284
3720 DEX
3730 STX BLINKA
3740 BMI BLINKINIT
3750 RTS
3760 BLINKINIT LDA #15
3770 STA BLINKA
3780 RTS
3790 ;
3800 FARBDAT DFB 0,0,11,11,12,12,15,15,1,1,15,15,12,12,11,11,0,0
3810 DFB 6,6,14,14,3,3,1,1,3,3,14,14,6,6,0,0
3820 DFB 2,2,10,10,7,7,1,1,7,7,10,10,2,2,0,0
3830 ;DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5,0,0
3840 DFB 9,9,8,8,7,7,1,1,7,7,8,8,9,9
3850 ;
3860 FARBLINE DFB 5,5,3,3,13,13,1,1,13,13,3,3,5,5
3870 ;
3880 COLA DFB 2,10,7,1,7,10,2,0,6,14,3,3,3,14,6,0
3890 COLB DFB 9,5,13,1,13,5,9,0,2,10,7,1,7,10,2,0
3900 COLC DFB 2,10,7,1,7,10,2,0,11,12,15,1,15,12,11,0
3910 ;
3920 ;
3930 TEXTTAB DFB 245,""
3940 DFB 246,""
3950 DFB ""
3960 DFB 247,""
3970 DFB ""
3980 DFB ""
3990 DFB 248,""
4000 DFB ""
4010 DFB "
4020 DFB ""
4030 DFB "
4040 DFB ""
4050 DFB "
4060 DFB ""
4070 DFB""
4080 DFB ""
4090 DFB "",0
4100 SCHL DFB 0
4110 JMP $EA31
READY.