1000 ; V1.0 29-05-87 CHW
1010 ; V1.1 07-06-87 CHW
1020 ;
1030 ORG 49152
1040 T1 EQU 250
1050 T2 EQU 252
1060 T3 EQU 254
1070 FARB EQU 50176
1080 BILD EQU 57344
1090 ;
1100 ;
1110 EINSPRUNG JMP INIT
1120 JMP SHOW
1130 JMP NORM
1140 JMP LOAD
1150 JMP PRINT
1160 ;
1170 DFB "",0
1180 ;
1190 INIT JSR $AEFD ; CKCOM
1200 JSR $B79E ; 1. ARG
1210 TXA
1220 AND #15
1230 STA COL
1240 ;
1250 JSR $AEFD ; CKCOM
1260 JSR $B79E ; 2. ARG
1270 TXA
1280 ASL
1290 ASL
1300 ASL
1310 ASL
1320 ORA COL
1330 STA COL
1340 ;
1350 LDY #0
1360 STY T1
1370 LDA #>BILD
1380 STA T1+1
1390 TYA
1400 INIT1 STA (T1),Y
1410 INY
1420 BNE INIT1
1430 INC T1+1
1440 BNE INIT1
1450 ;
1460 LDA COL
1470 INIT2 STA FARB,Y
1480 STA FARB+256,Y
1490 STA FARB+512,Y
1500 STA FARB+744,Y
1510 INY
1520 BNE INIT2
1530 RTS
1540 ;
1550 ;
1560 SHOW LDA 53272
1570 STA SAV53272
1580 LDA #59
1590 STA 53265
1600 LDA #24
1610 STA 53272
1620 LDA #148
1630 STA 56576
1640 RTS
1650 ;
1660 ;
1670 NORM LDA #151
1680 STA 56576
1690 LDA SAV53272
1700 STA 53272
1710 LDA #27
1720 STA 53265
1730 RTS
1740 ;
1750 ;
1760 LOAD LDA #1
1770 LDX #8
1780 LDY #0
1790 JSR $FFBA ; FILEPAR
1800 ;
1810 JSR $AEFD ; CKCOM
1820 JSR $AD9E ; FRMEVL
1830 JSR $AD8F ; CHKSTRING
1840 JSR $B6A6 ; FRESTR
1850 JSR $FFBD ; FILNAMPAR
1860 LDA #0
1870 LDX #0
1880 LDY #>BILD
1890 JSR $FFD5 ; LADEN
1900 RTS
1910 ;
1920 ;
1930 ILLQUANT JSR NORM
1940 JMP $B248
1950 ;
1960 ;
1970 PRINT JSR $AEFD ; CKCOM
1980 JSR $B79E ; 1. ARG
1990 CPX #40
2000 BCS ILLQUANT
2010 STX X
2020 ;
2030 JSR $AEFD ; CKCOM
2040 JSR $B79E ; 2. ARG
2050 CPX #25
2060 BCS ILLQUANT
2070 STX Y
2080 ;
2090 JSR $AEFD ; CKCOM
2100 JSR $B79E ; 3. ARG
2110 TXA
2120 AND #15
2130 STA COL
2140 ;
2150 JSR $AEFD ; CKCOM
2160 JSR $B79E ; 4. ARG
2170 TXA
2180 ASL
2190 ASL
2200 ASL
2210 ASL
2220 ORA COL
2230 STA COL
2240 ;
2250 JSR $AEFD ; CKCOM
2260 JSR $AD9E ; FRMEVL
2270 JSR $AD8F ; CHKSTRING
2280 JSR $B6A6 ; FRESTR
2290 STA STRLEN
2300 ;
2310 ;***BILDADR BERECHNEN
2320 ;
2330 LDA X
2340 STA T1
2350 LDA #0
2360 STA T1+1
2370 ASL T1 ; MAL 8
2380 ROL T1+1
2390 ASL T1
2400 ROL T1+1
2410 ASL T1
2420 ROL T1+1
2430 ;
2440 LDA #>BILD
2450 CLC
2460 ADC T1+1
2470 STA T1+1
2480 ;
2490 LDA #0 ; Y MAL 320
2500 STA T2+1
2510 LDA Y ; MAL 10
2520 STA T2
2530 ASL T2
2540 ASL T2
2550 CLC
2560 ADC T2
2570 STA T2
2580 ASL T2
2590 ;
2600 ASL T2 ; MAL 4
2610 ROL T2+1
2620 ASL T2
2630 ROL T2+1
2640 ;
2650 LDA T2 ; FUER FARBE
2660 STA T3
2670 LDA T2+1
2680 STA T3+1
2690 ;
2700 ASL T2 ; MAL 8
2710 ROL T2+1
2720 ASL T2
2730 ROL T2+1
2740 ASL T2
2750 ROL T2+1
2760 ;
2770 LDA T1 ; 8X+320Y+B
2780 CLC
2790 ADC T2
2800 STA T1
2810 LDA T1+1
2820 ADC T2+1
2830 STA T1+1
2840 ;
2850 ;
2860 ;***FARBADR BERECHNEN
2870 ;
2880 ;
2890 LDA T3 ; 40Y
2900 CLC
2910 ADC X
2920 STA T3
2930 LDA T3+1
2940 ADC #>FARB
2950 STA T3+1
2960 ;
2970 ;
2980 LDY #0
2990 LOOP1 CPY STRLEN
3000 BEQ PEND
3010 ;
3020 LDA ($22),Y ; NXT CHR
3030 JSR UMRECHNEN
3040 STA T2
3050 LDA #0
3060 STA T2+1
3070 ASL T2 ; MAL 8
3080 ROL T2+1
3090 ASL T2
3100 ROL T2+1
3110 ASL T2
3120 ROL T2+1
3130 ;
3140 LDA #216 ; ADR ZS
3150 CLC
3160 ADC T2+1
3170 STA T2+1
3180 ;
3190 TYA
3200 TAX
3210 SEI
3220 LDA #51
3230 STA 1
3240 LDY #7
3250 LOOP2 LDA (T2),Y
3260 STA (T1),Y
3270 DEY
3280 BPL LOOP2
3290 LDA #55
3300 STA 1
3310 CLI
3320 ;
3330 LDY #0
3340 LDA COL
3350 STA (T3),Y
3360 INC T3
3370 BNE W1
3380 INC T3+1
3390 ;
3400 W1 TXA
3410 TAY
3420 ;
3430 LDA T1
3440 CLC
3450 ADC #8
3460 STA T1
3470 BCC W2
3480 INC T1+1
3490 BNE W2
3500 ;
3510 JSR NORM
3520 JMP $B97E ; OVERFLOW
3530 ;
3540 W2 INY
3550 BNE LOOP1
3560 PEND RTS
3570 ;
3580 ;
3590 UMRECHNEN CMP #32
3600 BCS UMR1
3610 LDA #63 ; 0-31: ""
3620 RTS
3630 ;
3640 UMR1 CMP #64
3650 BCS UMR2
3660 RTS ; 32-63
3670 ;
3680 UMR2 CMP #96
3690 BCS UMR3
3700 SEC ; 64-95
3710 SBC #64
3720 RTS
3730 ;
3740 UMR3 CMP #128
3750 BCS UMR4
3760 SEC ; 96-127
3770 SBC #32
3780 RTS
3790 ;
3800 UMR4 CMP #160
3810 BCS UMR5
3820 LDA #63 ;128-159:""
3830 RTS
3840 ;
3850 UMR5 CMP #191
3860 BCS UMR6
3870 SEC ;160-191
3880 SBC #64
3890 RTS
3900 ;
3910 UMR6 CMP #224
3920 BCS UMR7
3930 SEC ;192-224
3940 SBC #96
3950 JMP UMRECHNEN
3960 ;
3970 UMR7 CMP #255
3980 BCS UMR8
3990 SEC ;224-254
4000 SBC #64
4010 JMP UMRECHNEN
4020 ;
4030 UMR8 LDA #126
4040 JMP UMRECHNEN
4050 ;
4060 ;
4070 ; *******************
4080 ;
4090 X DFB 0
4100 Y DFB 0
4110 COL DFB 0
4120 STRLEN DFB 0
4130 SAV53272 DFB 21
READY.