1000 ORG 20000
1100 V EQU 53248
1200 H1 EQU 832
1300 HRGCOL EQU $C400
1400 HRG EQU $E000
1500 CHRGEN EQU $C800
1600 BSP EQU $C400+800
1700 BSPCOL EQU $D800+800
1800 P1 EQU 20
1900 P2 EQU 139
2000 ALTPTR EQU 141
2100 ;********************
2200 INIT JSR SETMEMORY
2300 JSR SETIRQ
2400 JSR ZEICHENSATZ
2500 JSR SETSCREEN
2600 JSR HRGCLR
2700 JSR SETALTIM
2800 CLI
2900 LOOP LDX #50
3000 LDY #0
3100 A0 DEY
3200 BNE A0
3300 DEX
3400 BNE A0
3500 JSR INKALT
3600 JMP LOOP
3700 ;********************
3800 SETMEMORY SEI
3900 LDA 1
4000 AND #253
4100 STA 1
4200 LDA #<NMI
4300 STA $FFFA
4400 STA $FFFC
4500 LDA #>NMI
4600 STA $FFFB
4700 STA $FFFD
4800 LDA #<ISR
4900 STA $FFFE
5000 LDA #>ISR
5100 STA $FFFF
5200 LDX #32
5300 LDA #$C0
5400 STA P1+1
5500 LDA #$60
5600 STA P2+1
5700 LDY #0
5800 STY P1
5900 STY P2
6000 A1 LDA (P1),Y
6100 STA (P2),Y
6200 DEY
6300 BNE A1
6400 INC P1+1
6500 INC P2+1
6600 DEX
6700 BNE A1
6800 RTS
6900 ;********************
7000 SETIRQ LDA #11
7100 STA V+17
7200 LDA #127
7300 STA 56333
7400 LDA #241
7500 STA V+26
7600 LDA #27
7700 STA V+17
7800 LDA #0
7900 STA H1
8000 STA V+33
8100 LDA 56576
8200 AND #255-3
8300 STA 56576
8400 RTS
8500 ;********************
8600 NMI SEI
8700 PHA
8800 TXA
8900 PHA
9000 TYA
9100 PHA
9200 LDA 1
9300 ORA #2
9400 STA 1
9500 LDX #32
9600 LDA #$60
9700 STA P1+1
9800 LDA #$C0
9900 STA P2+1
10000 LDY #0
10100 STY P1
10200 STY P2
10300 A2 LDA (P1),Y
10400 STA (P2),Y
10500 DEY
10600 BNE A2
10700 INC P1+1
10800 INC P2+1
10900 DEX
11000 BNE A2
11100 PLA
11200 TAY
11300 PLA
11400 TAX
11500 PLA
11600 BRK
11700 ;********************
11800 ;********************
11900 ZEICHENSATZ LDX #0
12000 AA LDA ZEICHEN,X
12100 STA CHRGEN,X
12200 LDA ZEICHEN+256,X
12300 STA CHRGEN+256,X
12400 INX
12500 BNE AA
12600 RTS
12700 ;********************
12800 SETSCREEN LDX #200
12900 AB LDA DAT-1,X
13000 STA BSP-1,X
13100 LDA COL-1,X
13200 STA BSPCOL-1,X
13300 DEX
13400 BNE AB
13500 RTS
13600 DAT DFB 33,34,35,32,32,32,47,47,47,47,48,32,32,32,32,32
13700 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
13800 DFB 32,32,32,32,32,36,37,33
13900 ;
14000 DFB 42,32,0,0,32,32,20,24,28,28,46,32,32,32,32,32
14100 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
14200 DFB 38,32,0,0,0,0,0,0
14300 ;
14400 DFB 43,32,1,1,32,32,21,25,29,29,46,32,32,32,32,32
14500 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
14600 DFB 39,32,1,1,1,1,1,1
14700 ;
14800 DFB 44,32,0,0,32,32,22,26,30,30,46,32,32,32,32,32
14900 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
15000 DFB 40,32,0,0,0,0,0,0
15100 ;
15200 DFB 45,32,1,1,32,32,23,27,31,31,46,32,32,32,32,32
15300 DFB 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
15400 DFB 41,32,1,1,1,1,1,1
15500 ;
15600 ;
15700 COL DFB 12,12,12,0,0,0,8,8,8,8,8,3,3,3,3,3
15800 DFB 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
15900 DFB 3,3,3,3,3,12,12,12
16000 ;
16100 DFB 14,0,14,14,0,0,8,8,7,7,8,3,3,3,3,3
16200 DFB 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
16300 DFB 14,0,14,14,14,14,14,14
16400 ;
16500 DFB 14,0,14,14,0,0,8,8,7,7,8,3,3,3,3,3
16600 DFB 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
16700 DFB 14,0,14,14,14,14,14,14
16800 ;
16900 DFB 4,0,4,4,0,0,8,8,7,7,8,3,3,3,3,3
17000 DFB 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
17100 DFB 4,0,4,4,4,4,4,4
17200 ;
17300 DFB 4,0,4,4,0,0,8,8,7,7,8,3,3,3,3,3
17400 DFB 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3
17500 DFB 4,0,4,4,4,4,4,4
17600 ;********************
17700 HRGCLR LDA #>HRG
17800 STA P1+1
17900 LDA #0
18000 STA P1
18100 TAY
18200 LDX #25
18300 AD STA (P1),Y
18400 INY
18500 BNE AD
18600 INC P1+1
18700 DEX
18800 BNE AD
18900 LDA #0
19000 AE STA HRGCOL,X
19100 STA HRGCOL+256,X
19200 STA HRGCOL+512,X
19300 STA HRGCOL+543,X
19400 DEX
19500 BNE AE
19600 LDA #12
19700 STA HRGCOL+799
19800 RTS
19900 ;********************
20000 SETALTIM LDA #30
20100 STA ALTPTR
20200 ;********************
20300 INKALT LDX ALTPTR
20400 DEX
20500 BPL ALTANZ
20600 RTS
20700 ;********************
20800 DEKALT LDX ALTPTR
20900 LDA #0
21000 STA CHRGEN+224,X
21100 INX
21200 CPX #30
21300 BCC ALTANZ
21400 RTS
21500 ;********************
21600 ALTANZ LDA #255
21700 STA CHRGEN+224,X
21800 STX ALTPTR
21900 RTS
22000 ;********************
22100 ;********************
22200 ISR PHA
22300 TXA
22400 PHA
22500 TYA
22600 PHA
22700 LDX H1
22800 LDA #1
22900 STA V+25
23000 NOP
23100 NOP
23200 NOP
23300 NOP
23400 NOP
23500 NOP
23600 NOP
23700 NOP
23800 LDA TAB1,X
23900 STA V+17
24000 LDA TAB2,X
24100 STA V+32
24200 LDA TAB3,X
24300 STA V+18
24400 LDA TAB4,X
24500 STA V+24
24600 LDA TAB5,X
24700 STA V+33
24800 LDA TAB6,X
24900 STA V+22
25000 LDA #1
25100 STA V+25
25200 INX
25300 CPX #3
25400 BCC AQ
25500 LDX #0
25600 AQ STX H1
25700 LDA 56333
25800 PLA
25900 TAY
26000 PLA
26100 TAX
26200 PLA
26300 RTI
26400 TAB1 DFB 16,48,16 ;MODE
26500 TAB2 DFB 11,12,12 ;RAND
26600 TAB3 DFB 47,207,215 ;RAST
26700 TAB4 DFB 18,24,18 ;BASE
26800 TAB5 DFB 11,0,11 ;GRND
26900 TAB6 DFB 200,199,200;LEFT
27000 ; ********************
27100 ZEICHEN ;
27200 ZAHLEN DFB0,0,0,254,198,198,198,230,230,230,230,230,254,0,0,0
27300 DFB0,0,0,24,24,24,24,56,56,56,56,56,56,0,0,0
27400 DFB0,0,0,254,198,6,6,254,224,224,224,230,254,0,0,0
27500 DFB0,0,0,254,198,6,6,126,14,14,14,206,254,0,0,0
27600 DFB0,0,0,198,198,198,198,254,14,14,14,14,14,0,0,0
27700 DFB0,0,0,254,198,192,192,254,14,14,14,206,254,0,0,0
27800 DFB0,0,0,254,198,192,192,254,230,230,230,230,254,0,0,0
27900 DFB0,0,0,254,198,12,24,24,56,56,56,56,56,0,0,0
28000 DFB0,0,0,126,102,102,102,126,230,230,230,230,254,0,0,0
28100 DFB0,0,0,254,198,198,198,254,14,14,14,206,254,0,0,0
28200 ALTIM DFB 255,255,224,230,230,230,224,230,230,230
28300 DFB 255,255,231,231,231,231,231,231,231,224
28400 DFB 255,255,224,249,249,249,249,249,249,255,255,255
28500 I DFB 255,255,103,103,103,103,103,103,103,103
28600 DFB 231,231,231,227,225,224,225,227,231,103
28700 DFB 231,231,103,231,231,231,231,231,231,255,255,0
28800 ALTLINE DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
28900 DFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0
29000 SPACES DFB 0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255
29100 TREPPAUF DFB 255,255,255,255,252,240,192,0,252,240,192,0,0,0,0,0
29200 TREPPAB DFB 255,63,15,3,0,0,0,0,255,255,255,255,255,63,15,3
29300 P DFB 0,0,0,127,99,99,99,127,112,112,112,112,112,0,0,0
29400 E DFB 0,0,0,126,96,96,96,124,112,112,112,112,126,0,0,0
29500 L DFB 0,0,0,96,96,96,96,96,112,112,112,112,126,0,0,0
29600 B DFB 0,0,0,124,108,108,108,126,118,118,118,118,126,0,0,0
29700 LINIE LI DFB 192,192,192,192,192,192,192,192
29800 LINIE UNT DFB 0,0,0,0,0,0,0,255
29900 PUNKT UNT DFB 0,0,0,0,0,0,0,192
READY.