10REM ***** PC*BOX ****** 20REM VERSION 1.0 020892. 30REM R. LEURS - BEEK (L) 40REM==================== 50 60R=#9000 ; REM PLAATS VAN DE CODE TIJDENS ASSEMBLEREN 70P.$12$15"SOURCE PC*BOX"';DOP."=";U.C.>=14 80P.''"CLEANING SPACE"'';@=0 90F.X=R TO R+#FFC S.4;!X=#FFFFFFFF;N. 100P.'"PASS1";PASS2;GOS.a 110P.'"PASS2";PASS1;GOS.a 120P.'ERRORS" ERRORS, "WARNINGS" WARNINGS"'' 130P.''"CODE VAN #"&PCROM" T/M #"&(P-1)' 140P."NOG VRIJ: "(#AFFF-P)" BYTES"'' 150END 160 170a 180 ASM-B 190 200 .OPTION #40 210 .CODE #A000 220 .RAM R 230 240 :ZP = #90 250 :HS = #DE 260 :VS = #DF 270 :OSBYTE = #FFC2 280 :LEESBYTE = #FFC5 290 :ZENDBYTE = #FFC8 300 :WRITE = #FFF4 310 :SYSVIA = #B800 \ ADRES SYSTEEM VIA 315 :ESC_ROUT = #700 \ WORDT GEBRUIKT DOOR ESCAPE=ON/OFF 320 330 :PCROM .BY #40,#BF 340 350\interpreteerroutine 360 LDX @#FF 370 :ZOEK0 LDY #5E 380 DEY 390 :ZOEK1 INX 400 INY 410 :ZOEK2 LDA TABEL,X 420 BMI ZOEK4 430 CMP (#05),Y 440 BEQ ZOEK1 450 DEX 460 :ZOEK3 INX 470 LDA TABEL,X 480 BPL ZOEK3 490 INX 500 LDA (#05),Y 510 CMP @#2E 520 BNE ZOEK0 530 INY 540 DEX 550 BCS ZOEK2 560 :ZOEK4 STA #53 570 LDA TABEL+1,X 580 STA #52 590 STY #03 600 LDX #04 610 JMP (#52) 620 630 :TABEL 636 .AS "ASC2BAS" ; .DB ASCLOAD 639 .AS "ATOMVDU" ; .DB VDU3216 640 .AS "ATTRIB" ; .DB KLEUR 650 .AS "CENTER" ; .DB CENTER 660 .AS "CLW" ; .DB CLW 670 .AS "CURSOR" ; .DB CURSOR 680 .AS "DATE" ; .DB DATE 690 .AS "DAY" ; .DB DAY 695 .AS "ESCAPE" ; .DB ESCAPE 700 .AS "FONT" ; .DB FONT 710 .AS "GTEXT" ; .DB GRMOD 720 .AS "INP" ; .DB INPORT 730 .AS "KADER" ; .DB KADER 733 .AS "LPT" ; .DB LPT 734 .AS "MENU" ; .DB MENU 740 .AS "MOUSE" ; .DB MOUSE 747 .AS "MSB" ; .DB MSB 748 .AS "NONMI" ; .DB NONMI 750 .AS "OUT" ; .DB OUTPORT 760 .AS "PCBOX" ; .DB PCBOX 766 .AS "PRN" ; .DB LPT 770 .AS "REPORT" ; .DB REPORT 777 .AS "SCAN" ; .DB SCAN 780 .AS "TIME" ; .DB TIME 790 .AS "TSIZE" ; .DB TSIZE 800 .AS "TWINDOW" ; .DB TWINDOW 810 .AS "TWOFF" ; .DB TWOFF 830 .AS "UDS" ; .DB UDS 840 .DB #C558 850 860 870 :STACK LDX @#00 880 STX #04 890 RTS 900 910 :COMMANDO PHA 920 LDA @#00 930 JSR ZENDBYTE 940 PLA 950 JMP ZENDBYTE 960 970 \ HELP ROUTINE 980 :PCBOX JSR #C4E4;JSR #F7D1 990 .BY 16 1000 :NAAM .AS "PC*BOX V1.04" 1010 .BY #0D,#0A,#0A 1020 .AS "(c) Roland Leurs 1995",#0D,#0A,#0A,#EA 1030 JSR PCBOX7 1040 STA ZP+1 1050 STA ZP+2 1060 TAY 1070 :PCBOX1 LDA TABEL,Y 1080 STA ZP+2 1090 CMP @#C5 1100 BNE PCBOX2 1110 INY 1120 LDA TABEL,Y 1130 CMP @#58 1140 BEQ PCBOX8 1150 DEY 1160 :PCBOX2 LDA ZP+2 1170 AND @#F0 1180 CMP @#A0 1190 BNE PCBOX3 1200 LDA ZP 1210 CMP @#0B 1220 BNE PCBOX5 1230 LDA ZP+1 1240 CMP @#02 1250 BEQ PCBOX6 1260 CLC 1270 ADC @#01 1280 STA ZP+1 1290 JSR PCBOX7 1300 INY 1310 INY 1320 JMP PCBOX1 1330 :PCBOX3 LDA ZP 1340 CLC 1350 ADC @#01 1360 STA ZP 1370 CMP @#0B 1380 BEQ PCBOX1 1390 LDA ZP+2 1400 JSR #FFF4 1410 CMP @#20 1420 BNE PCBOX4 1430 JMP PCBOX5 1440 :PCBOX4 INY 1450 JMP PCBOX1 1460 :PCBOX5 LDA @#20 1470 STA ZP+2 1480 JMP PCBOX3 1490 :PCBOX6 JSR #FFED 1500 JSR PCBOX7 1510 STA ZP+1 1520 INY 1530 INY 1540 JMP PCBOX1 1550 :PCBOX7 LDA @#00 1560 STA ZP 1570 RTS 1580 :PCBOX8 JSR #FFED 1590 JSR #FFED 1600 JMP #C55B 1610 1620 \ CLW COMMANDO 1630 :CLW JSR #C4E4 1640 LDA @16 1650 JSR #FFF4 1660 JMP #C55B 1670 1680 :LEESVAR JSR #F291 1690 SEC 1700 SBC @#40 1710 CMP @#1B 1720 BCC LEESVAR1 1730 LDX @135;LDA @12;JSR OSBYTE 1740 :LEESVAR1 STA ZP 1750 RTS 1760 1770 1780 \ TEKEN KADER, GEBRUIKT DOOR KADER EN PDMENU 1790 :LOCATE 1800 PHA;TYA;PHA;LDA @30;JSR WRITE 1810 LDY #16;:LOCATE1 BEQ LOCATE2;LDA @9;JSR WRITE;DEY;JMP LOCATE1 1820 :LOCATE2 1830 LDY #19;:LOCATE3 BEQ LOCATE4;LDA @10;JSR WRITE;DEY;JMP LOCATE3 1840 :LOCATE4 PLA;TAY;PLA;RTS 1850 1860 :TEKADER 1870 DEC #18 1880 LDA #19 1890 PHA 1900 LDX ZP+1 1910 JSR LOCATE 1920 LDA KARTAB,X ; JSR WRITE 1930 LDY #16 1940 LDA KARTAB+2,X 1950 :KADERLUS1 1960 JSR WRITE 1970 INY 1980 CPY #18 1990 BNE KADERLUS1 2000 LDA KARTAB+4,X 2010 JSR WRITE 2020 :KADERLUS2 2030 INC #19 2040 LDA #19 2050 CMP #17 2060 BEQ BOTTOM 2070 JSR LOCATE 2080 LDA KARTAB+6,X ; JSR WRITE 2090 LDY #16 2100 LDA @#20 2110 :KADERLUS3 2120 JSR WRITE 2130 INY 2140 CPY #18 2150 BNE KADERLUS3 2160 LDA KARTAB+6,X ; JSR WRITE 2170 JMP KADERLUS2 2180 :BOTTOM 2190 JSR LOCATE 2200 LDA KARTAB+8,X ; JSR WRITE 2210 LDY #16 2220 LDA KARTAB+2,X 2230 :KADERLUS4 2240 JSR WRITE 2250 INY 2260 CPY #18 2270 BNE KADERLUS4 2280 LDA KARTAB+10,X ; JSR WRITE 2290 INC #16 2300 PLA 2310 STA #19 2320 INC #19 2330 JMP LOCATE 2340 2350 :KARTAB 2360 .BYTE 201,218,205,196,187,191 2370 .BYTE 186,179,200,192,188,217 2380 2390 :LEESPAR 2400 JSR #C78B 2410 JSR #C231 2420 JSR #C78B 2430 JSR #C231 2440 JSR #C78B 2450 JSR #C231 2460 JSR #C78B 2470 JSR #C231 2480 JSR #F291 2490 AND @#01 2500 STA ZP+1 2510 JSR #C231 2520 JSR #C78B 2530 2540 :KADERCOL 2550 LDA @00;JSR ZENDBYTE;LDA @#33;JSR ZENDBYTE 2560 LDA #1A 2570 JSR ZENDBYTE 2580 RTS 2590 2600 :KADER 2610 JSR LEESPAR 2620 LDA @11;JSR OSBYTE;BCC P-3 2630 JSR TEKADER 2640 LDA @10;JSR OSBYTE 2650 JSR STACK 2660 JMP #C558 2670 2680 \ CURSOR ROUTINES 2690 :CURSOR 2700 LDA @11;JSR OSBYTE \ TEST SEMAFOOR 2710 BCC CURSOR \ WACHT ALS GEEN TOEGANG TOT PC 2720 JSR #F291 2730 CMP @CH"O" 2740 BEQ CUR_O 2750 CMP @CH"P" 2760 BEQ CUR_P 2770 CMP @CH"T" 2780 BEQ CUR_T 2790 :CUR_ERROR 2800 LDA @10;JSR OSBYTE \ RESET SEMAFOOR 2810 LDA @12;LDX @135;JSR OSBYTE \ ERROR 135 2820 :CUR_O 2830 JSR #F291 2840 CMP @CH"N" 2850 CLC 2860 BEQ CUR_CONTR 2870 CMP @CH"F" 2880 BNE CUR_ERROR 2890 JSR #F291 2900 CMP @CH"F" 2910 BNE CUR_ERROR 2920 :CUR_OFF 2930 SEC 2940 :CUR_CONTR 2950 LDA @09;ADC @0;JSR COMMANDO 2960 JMP CUR_END 2970 2980 :CUR_P 2990 JSR #F291 3000 CMP @CH"O" 3010 BNE CUR_ERROR 3020 JSR #F291 3030 CMP @CH"S" 3040 BNE CUR_ERROR 3050 JMP CUR_POS 3060 3070 :CUR_T 3080 JSR #F291 3090 CMP @CH"O" 3100 BNE CUR_ERROR 3110 :CURSOR_TO 3120 JSR #C78B 3130 JSR #C231 3140 JSR #C78B 3150 LDA #17;STA#19;JSR LOCATE 3160 JMP CUR_END 3170 3180 :CUR_POS 3190 JSR LEESVAR 3200 LDY #03 3210 :CUR_POS1 3220 LDA (#05),Y 3230 CMP @#0D 3240 BEQ CUR_CHAR 3250 CMP @CH";" 3260 BEQ CUR_CHAR 3270 CMP @CH" " 3280 BNE CUR_POSI 3290 INY 3300 JMP CUR_POS1 3310 :CUR_POSI 3320 LDA ZP 3330 STA ZP+1 3340 JSR #C231 3350 JSR LEESVAR 3360 LDA @30 \ VRAAG AAN PC WAT DE CURSOR POSITIE IS 3370 JSR COMMANDO 3380 LDY @1 3390 :CUR_POSI1 3400 LDX ZP,Y 3410 JSR ZEROVAR 3420 JSR LEESBYTE 3430 STA #321,X 3440 DEY 3450 BPL CUR_POSI1 3460 :CUR_END 3470 LDA @10;JSR OSBYTE \ RESET SEMAFOOR 3480 JSR STACK 3490 JMP #C558 3500 3510 :CUR_CHAR 3520 LDA @#02 3530 JSR COMMANDO 3540:LEESRESULT JSR LEESBYTE 3550 LDX ZP;STA #321,X;LDA @0 3560 STA #372,X;STA #357,X 3570 STA #33C,X;JMP CUR_END 3580 3590 :MOUSE \ tweede interpreteerroutine 3600 LDX @#FF 3610 :MZOEK0 LDY #03 3620 :MZOEK1 INX 3630 INY 3640 :MZOEK2 LDA MTABEL,X 3650 BMI MZOEK4 3660 CMP (#05),Y 3670 BEQ MZOEK1 3680 DEX 3690 :MZOEK3 INX 3700 LDA MTABEL,X 3710 BPL MZOEK3 3720 INX 3730 LDA (#05),Y 3740 CMP @#2E 3750 BNE MZOEK0 3760 INY 3770 DEX 3780 BCS MZOEK2 3790 :MZOEK4 STA #53 3800 LDA MTABEL+1,X 3810 STA #52 3820 STY #03 3830 LDX #04 3840 JMP (#52) 3850 3860 :MTABEL 3870 .AS "INIT" ; .DB MUIS_INIT 3880 .AS "KVO" ; .DB MUIS_KVO 3890 .AS "ON" ; .DB MUIS_ON 3900 .AS "OFF" ; .DB MUIS_OFF 3910 .AS "POS" ; .DB MUIS_POS 3920 .AS "TO" ; .DB MUIS_TO 3930 .AS "COUNT" ; .DB MUIS_COUNT 3940 .AS "WINDOW" ; .DB MUIS_WINDOW 3950 .AS "CURTYPE" ; .DB MUIS_CURSOR 3960 .AS "BUTTON" ; .DB MUIS_BUTTON 3967 .AS "CHAR" ; .DB MUIS_CHAR 3970 .DB #C558 3980 3990 :MUIS_INIT JSR #F291;LDX @0;DEC #03 4000 CMP @13;BEQ MUIS_INIT1;CMP @CH";";BEQ MUIS_INIT1 4010 JSR LEESVAR;LDA ZP;TAX;JSR ZEROVAR 4020 :MUIS_INIT1 JSR #C4E4;JSR MUIS_ZERO;JSR MOUSECOM 4030 CPX @0;BEQ MOUSE_END;LDY ZP+2;LDA ZP;ORA ZP+1;BNE P+4;LDY @#FF 4040 TYA;STA #321,X 4050 4060 :MOUSE_END JSR STACK;JMP #C55B 4070 4080 :MUIS_ON JSR #C4E4;LDA @1;STA ZP;LDA @0;STA ZP+1 4090 JSR MOUSECOM;JMP MOUSE_END 4100 4110 :MUIS_OFF JSR #C4E4 4120 :MUIS_OFF2 LDA @#02;BNE MUIS_ON+5 4130 4140 :MUIS_POS JSR LEESVAR;LDA ZP;PHA;JSR #C231 4150 JSR LEESVAR;LDA ZP;PHA;JSR #C231 4160 JSR LEESVAR;LDA ZP;PHA;JSR #C4E4 4170 LDA @0;STA ZP+1;LDA @3;STA ZP;JSR MOUSECOM 4180 PLA;TAX;JSR ZEROVAR;LDA ZP+2;STA #321,X;LDA ZP+3;STA #33C,X 4190 PLA;TAX;JSR ZEROVAR;LDA ZP+6;STA #321,X;LDA ZP+7;STA #33C,X 4200 PLA;TAX;JSR ZEROVAR;LDA ZP+4;STA #321,X;LDA ZP+5;STA #33C,X 4210 JMP MOUSE_END 4220 4230 :MUIS_TO JSR #C78B;JSR #C231;JSR #C4E1 4240 JSR MUIS_ZERO;LDA #16;STA ZP+4;LDA #25;STA ZP+5 4250 LDA #17;STA ZP+6;LDA #26;STA ZP+7 4260 LDA @4;STA ZP;JSR MOUSECOM 4270 JMP MOUSE_END 4280 4290 :MUIS_COUNT JSR MUIS_ZERO;LDA @11;STA ZP;JSR MOUSECOM 4300 JSR LEESVAR;TAX;JSR ZEROVAR;LDA ZP+4;STA #321,X;LDA ZP+5;STA #33C,X 4310 JSR #C231 4320 JSR LEESVAR;TAX;JSR ZEROVAR;LDA ZP+6;STA #321,X;LDA ZP+7;STA #33C,X 4330 JSR #C4E4;JMP MOUSE_END 4340 4350 :MUIS_WINDOW JSR #C78B;JSR #C231;JSR #C78B;JSR #C231 4360 JSR #C78B;JSR #C231;JSR #C4E1 4370 JSR MUIS_ZERO;LDA @7;STA ZP;LDA #16;STA ZP+6;LDA #25;STA ZP+7 4380 LDA #18;STA ZP+4;LDA #27;STA ZP+5;JSR MOUSECOM 4390 JSR MUIS_ZERO;LDA @8;STA ZP;LDA #17;STA ZP+6;LDA #26;STA ZP+7 4400 LDA #19;STA ZP+4;LDA #28;STA ZP+5;JSR MOUSECOM 4410 JMP MOUSE_END 4420 4430 :MUIS_CURSOR JSR MUIS_ZERO;JSR #F291;CMP @CH"H";BEQ MUIS_CUR_H;CMP @CH"S" 4440 BEQ MUIS_CUR_S;CMP @CH"G";BEQ MUIS_CUR_G;JMP CUR_ERROR+5 4450 :MUIS_CUR_H;LDA @1;BNE MUIS_CUR_S+2 4460 :MUIS_CUR_S;LDA @0;STA ZP+2;LDA @10;STA ZP;JSR #C231 4470 JSR #C78B;JSR #C231;JSR #C4E1 4480 LDA #16;STA ZP+4;LDA #25;STA ZP+5 4490 LDA #17;STA ZP+6;LDA #26;STA ZP+7 4500 JSR MOUSECOM;JMP MOUSE_END 4510 4520 :MUIS_CUR_G JSR #C231;JSR #C78B 4530 LDA #16;STA ZP+8;LDA #25;STA ZP+9;JSR #C231 4540 JSR MUIS_ZERO;JSR #C78B;LDA #17;STA ZP+2;LDA #26;STA ZP+3;JSR #C231 4550 JSR #C4E1;LDA #18;STA ZP+4;LDA #27;STA ZP+5 4560 :MUIS_CUR_G0 LDA @11;JSR OSBYTE;BCC MUIS_CUR_G0 4570 LDA @#09;STA ZP;LDA @29;JSR COMMANDO;LDY @0 4580 :MUIS_CUR_G1 LDA (ZP+8),Y;JSR ZENDBYTE;INY;CPY @64;BNE MUIS_CUR_G1 4590 LDA @10;JSR OSBYTE;JSR MOUSECOM;JMP MOUSE_END 4600 4610 :MUIS_BUTTON JSR #C78B;JSR MUIS_ZERO;LDA #16;STA ZP+2;JSR #C231 4620 JSR #F291;CMP @CH"P";BEQ MUIS_BUTT_P;CMP @CH"R";BEQ MUIS_BUTT_R 4630 JMP CUR_ERROR+5 4640 :MUIS_BUTT_P;LDA @5;BNE MUIS_BUTT_R+2 4650 :MUIS_BUTT_R;LDA @6;STA ZP;JSR MOUSECOM 4660 JSR #C231;JSR LEESVAR;TAX;JSR ZEROVAR 4670 LDA ZP+2;STA #321,X;LDA ZP+3;STA #33C,X;JSR #C231 4680 JSR LEESVAR;TAX;JSR ZEROVAR;LDA ZP+4;STA #321,X;LDA ZP+5;STA #33C,X 4690 JSR #C231;JSR LEESVAR;TAX;JSR ZEROVAR;LDA ZP+6;STA #321,X 4700 LDA ZP+7;STA #33C,X;JSR STACK;JMP #C558 4710 4720 :MUIS_KVO JSR #C4E4;LDA @#03;STA ZP;LDA @#00;STA ZP+1 4730 JSR MOUSECOM;LDA ZP+4;STA #339;LDA @#C0;SEC;SBC ZP+6;STA #33A 4740 LDA ZP+2;STA #33B;JMP MOUSE_END 4741 4742 :MUIS_CHAR JSR LEESVAR;TAX;JSR #C4E4;JSR ZEROVAR 4743 LDA @11;JSR OSBYTE;BCC P-3 4744 LDA @#45;JSR COMMANDO 4749 JSR LEESBYTE;STA #321,X;LDA @10;JSR OSBYTE;JMP #C55B 4750 4760 :MUIS_ZERO LDY @7;LDA @0 4770 :MUIS_ZERO1 STA ZP,Y;DEY;BPL MUIS_ZERO1;RTS 4780 4790 :MOUSECOM LDA @11;JSR OSBYTE 4800 BCC MOUSECOM 4810 LDA @28;JSR COMMANDO 4820 :REGISTERS LDY @0 4830 :MOUSECOM1 LDA ZP,Y;JSR ZENDBYTE;INY;CPY @8;BNE MOUSECOM1 4840 LDY @0 4850 :MOUSECOM2 JSR LEESBYTE;STA ZP,Y;INY;CPY @8;BNE MOUSECOM2 4860 LDA @10;JSR OSBYTE;RTS 4870 4880 :ZEROVAR LDA @0;STA #321,X;STA #33C,X;STA #357,X 4890 STA #372,X;RTS 4900 4910 :BREAK JSR #F7FA;TXA;JSR #F7FA;TYA;JSR #F7FA;BRK 4920 4930 :GRMOD JSR #F291;DEC #03;CMP @CH";";BEQ GRINIT;CMP @13;BEQ GRINIT 4940 JSR FONTINIT 4950 :GRINIT JSR #C4E4 4960 LDA @<GRCH;STA #208;LDA @>GRCH;STA #209 4970 LDA @#B5;STA #3FE;LDA @#EE;STA #3FF 4980 LDA @12;JSR #FFF4;LDA @1;STA HS;STA VS;JSR SETSIZE;JMP #C55B 4990 :GRCH STA #E2;PHA;TXA;PHA 5000 :GRCH1 LDA @11;JSR OSBYTE;BCC GRCH1;LDA #E2 5010 SEC;SBC @8;BMI WRITECH;CMP @6;BPL WRITECH;ASL A;TAX 5020 LDA GRTAB,X;STA #E1;LDA GRTAB+1,X;STA #E0;JMP (#E0) 5030 :WRITECH LDX @0;LDA @#00;JSR ZENDBYTE;LDA @#07;JSR ZENDBYTE 5040 :WRITE1 LDA #3C1,X;JSR ZENDBYTE;INX;CPX @4;BNE WRITE1 5050 LDA #E2;JSR ZENDBYTE;LDA @#00;JSR ZENDBYTE 5060 :SPACE LDX HS;CLC;LDA #3C1;ADC @8;STA #3C1;LDA #3C2;ADC @0;STA #3C2 5070 DEX;BNE SPACE+2;JMP ENDWRITE 5080 :BACKSPACE LDX HS;SEC;LDA #3C1;SBC @8;STA #3C1;LDA #3C2;SBC @0;STA #3C2 5090 DEX;BNE BACKSPACE+2;JMP ENDWRITE 5100 :LINEUP LDX VS;SEC;LDA #3C3;SBC @16;STA #3C3;LDA #3C4;SBC @0;STA #3C4 5110 DEX;BNE LINEUP+2;JMP ENDWRITE 5120 :LINEFEED LDX VS;CLC;LDA #3C3;ADC @16;STA #3C3;LDA #3C4;ADC @0;STA #3C4 5130 DEX;BNE LINEFEED+2;JMP ENDWRITE 5140 :CLEAR LDA @0;JSR ZENDBYTE;LDA @4;JSR ZENDBYTE 5150 LDA @0;STA #3C1;STA #3C2;STA #3C3 5160 STA #3C4;JMP ENDWRITE 5170 :CARRET LDA @0;STA #3C1;STA #3C2 5180 :ENDWRITE LDA @10;JSR OSBYTE;PLA;TAX;PLA;RTS 5190 :GRTAB .DB BACKSPACE,SPACE,LINEFEED 5200 .DB LINEUP,CLEAR,CARRET 5210 5260 :FONTINIT LDA @10;JSR OSBYTE;BCC FONT 5270 LDA @#00;JSR ZENDBYTE;LDA @#06;JSR ZENDBYTE 5280 :FONT1 JSR #F291;CMP @CH";";BEQ ENDFONT;CMP @13;BEQ ENDFONT 5290 JSR ZENDBYTE;JMP FONT1 5300 :ENDFONT LDA @#00;JSR ZENDBYTE;DEC #03;JSR LEESBYTE;BNE ENDFONT1 5310 :RESETSEM LDA @10;JMP OSBYTE 5320 :ENDFONT1 JSR RESETSEM;LDA @12;LDX @1;JMP OSBYTE 5330 RTS 5340 5350 :FONT JSR FONTINIT;JMP #C558 5360 5370 :TSIZE JSR #C78B;JSR #C231;JSR #C4E1 5380 LDA #16;BEQ TERR;LDA #17;BNE TSIZE1 5390 :TERR LDA @12;LDX @7;JMP OSBYTE 5400 :TSIZE1 LDA #16;CMP @33;BCS TERR;STA HS;LDA #17;CMP @33;BCS TERR 5410 STA VS;JSR SETSIZE;JSR STACK;JMP #C55B 5420 :SETSIZE LDA @11;JSR OSBYTE;BCC SETSIZE 5430 LDA @#08;JSR COMMANDO;LDA HS;JSR ZENDBYTE 5440 LDA VS;JSR ZENDBYTE 5450 LDA @10;JSR OSBYTE;RTS 5460 5470 :INPORT JSR #C78B;JSR #C231;JSR LEESVAR;JSR #C4E4 5480 :INPORT1 LDA @11;JSR OSBYTE;BCC INPORT1 5490 LDA @35;JSR COMMANDO;LDA #16;JSR ZENDBYTE 5500 LDA #25;JSR ZENDBYTE;LDX ZP;JSR ZEROVAR; 5510 JSR LEESBYTE;STA #321,X;LDA @10;JSR OSBYTE 5520 JSR STACK;JMP #C55B 5530 5540 :OUTPORT JSR #C78B;JSR #C231;JSR #C4E1 5550 :OUTPORT1 LDA @11;JSR OSBYTE;BCC OUTPORT1 5560 LDA @36;JSR COMMANDO;LDA #16;JSR ZENDBYTE 5570 LDA #25;JSR ZENDBYTE;LDA #17;JSR ZENDBYTE 5580 LDA @10;JSR OSBYTE;JSR STACK;JMP #C55B 5590 5600 :UDS JSR #C78B;LDA #16;PHA;LDY @#0F;LDA @#00;STA #04;STY #0B 5610 :UDS1 JSR #C231;JSR #C78B;LDA #16;LDY #0B;STA ZP,Y 5620 LDA @#00;STA #04;DEC #0B;BPL UDS1;JSR #C4E4 5630 LDA @11;JSR OSBYTE;LDA @37;JSR COMMANDO 5640 PLA;JSR ZENDBYTE;LDY @#0F 5650 :UDS2 LDA ZP,Y;JSR ZENDBYTE;DEY;BPL UDS2 5660 LDA @10;JSR OSBYTE;JMP #C55B 5670 5680 :REPORT JSR #C4E1;LDA #16;STA #00 5690 LDA @#0D;JSR OSBYTE;JSR STACK;JMP #C55B 5700 5710 :KLEUR JSR #C4E1;LDA @11;JSR OSBYTE;BCC P-3 5720 LDA @#00;JSR ZENDBYTE;LDA @#33;JSR ZENDBYTE 5730 LDA #16;JSR ZENDBYTE;LDA @10;JSR OSBYTE;JSR STACK 5740 JMP #C55B 5750 5760 :TWINDOW JSR #C78B;JSR #C231;JSR #C78B;JSR #C231 5770 JSR #C78B;JSR #C231;JSR #C4E1;LDX @#00 5780 :TWINDOW1 LDA @11;JSR OSBYTE;BCC TWINDOW1 5790 LDA @#00;JSR ZENDBYTE;LDA @53;JSR ZENDBYTE 5800 :TWINDOW2 LDA #16,X;JSR ZENDBYTE;INX 5810 CPX @4;BNE TWINDOW2 5820 LDA @10;JSR OSBYTE;JSR STACK;JMP #C55B 5830 5840 :TWOFF JSR #C4E4;LDA @11;JSR OSBYTE;BCC P-3 5850 LDA @#00;JSR ZENDBYTE;LDA @54;JSR ZENDBYTE 5860 LDA @10;JSR OSBYTE;JMP #C55B 5870 5880 :TIME JSR #F291;CMP @CH"$";BEQ TIMESTRING 5890 CMP @#0D;BEQ TIMEPRINT;CMP @CH";";BEQ TIMEPRINT 5900 LDA @12;LDX @29;JMP OSBYTE; \ ERROR 29 BIJ VERKEERDE PARAMETER 5910 :TIMEPRINT DEC #03;JSR #C4E4;JSR PCTIME;LDA ZP+5;JSR HEX2BCD;JSR #F802 5920 LDA @CH":";JSR #FFF4;LDA ZP+4;JSR HEX2BCD 5930 JSR #F802;LDA @CH":";JSR #FFF4;LDA ZP+7;JSR HEX2BCD 5940 JSR #F802;JMP #C55B 5950 :TIMESTRING JSR #C4E1;JSR PCTIME;LDA #16;STA ZP+2;LDA #25;STA ZP+3 5960 LDY @0;LDA ZP+5;JSR CNV2ASC;LDA @CH":";STA (ZP+2),Y;INY 5970 LDA ZP+4;JSR CNV2ASC;LDA @CH":";STA (ZP+2),Y;INY 5980 LDA ZP+7;JSR CNV2ASC 5990 LDA @#0D;STA (ZP+2),Y;JSR STACK;JMP #C55B 6000 6010 :DATE JSR #F291;CMP @CH"$";BEQ DATESTRING 6020 CMP @#0D;BEQ DATEPRINT;CMP @CH";";BEQ DATEPRINT 6030 LDA @12;LDX @29;JMP OSBYTE; \ ERROR 29 BIJ VERKEERDE PARAMETER 6040 :DATEPRINT DEC #03;JSR #C4E4;JSR PCDATE;LDA ZP+6;JSR HEX2BCD;JSR #F802 6050 LDA @CH"-";JSR #FFF4;LDA ZP+7;JSR HEX2BCD;JSR #F802 6060 LDA @CH"-";JSR #FFF4;SEC;LDA ZP+4;SBC @<1900;STA ZP+4 6070 LDA ZP+5;SBC @>1900;STA ZP+5;LDX @19;LDA ZP+4;CMP @100;BMI DATEPRINT1 6080 INX;SEC;SBC @100;STA ZP+4 6090 :DATEPRINT1 TXA;JSR HEX2BCD;JSR#F802;LDA ZP+4;JSR HEX2BCD 6100 JSR #F802;JMP #C55B 6110 :DATESTRING JSR #C4E1;JSR PCDATE;LDA #16;STA ZP+2;LDA #25;STA ZP+3 6120 LDY @0;LDA ZP+6;JSR CNV2ASC;LDA @CH"-";STA (ZP+2),Y;INY 6130 LDA ZP+7;JSR CNV2ASC;LDA @CH"-";STA (ZP+2),Y;INY 6140 SEC;LDA ZP+4;SBC @<1900;STA ZP+4;LDA ZP+5;SBC @>1900;STA ZP+5 6150 LDX @19;LDA ZP+4;CMP @100;BMI DATESTRING1;INX 6160 SEC;SBC @100;STA ZP+4 6170 :DATESTRING1 TXA;JSR CNV2ASC;LDA ZP+4;JSR CNV2ASC 6180 LDA @#0D;STA (ZP+2),Y;JSR STACK;JMP #C55B 6190 6200 :PCTIME LDA @#2C;STA ZP+1;BNE PCKLOK 6210 :PCDATE LDA @#2A;STA ZP+1 6220 :PCKLOK LDA @11;JSR OSBYTE;BCC PCKLOK 6230 LDA @34;JMP REGISTERS-3 6240 6250 :CNV2ASC JSR HEX2BCD;PHA;LSR A;LSR A;LSR A;LSR A;CLC;ADC @#30 6260 STA (ZP+2),Y;INY;PLA;AND @#0F;CLC;ADC @#30;STA (ZP+2),Y;INY 6270 RTS 6280 6290 :HEX2BCD LDX @#01;STA ZP+1 6300 LDA @#00;STA ZP 6310 :HEX2BCD1 SEC;LDA ZP+1;SBC #C608,X;STA ZP+1 6320 BMI HEX2BCD2 6330 CLC;LDA ZP;ADC HEXTAB,X;STA ZP;JMP HEX2BCD1 6340 :HEX2BCD2 CLC;LDA ZP+1;ADC #C608,X;STA ZP+1; 6350 DEX;BPL HEX2BCD1;LDA ZP;RTS 6360 :HEXTAB .BYTE #01,#10 6370 6380 :DAY JSR #F291;CMP @CH"$";BEQ DAYSTRING 6390 CMP @#0D;BEQ DAYPRINT;CMP @CH";";BEQ DAYPRINT 6400 LDA @12;LDX @29;JMP OSBYTE 6410 :DAYPRINT DEC #03;JSR #C4E4;JSR PCDATE;LDA ZP;ASL A;ASL A;ASL A 6420 TAX;DEX 6430 :DAYPRINT1 INX;LDA WEEK,X;CMP @CH" ";BEQ P+8;JSR #FFF4;JMP DAYPRINT1 6440 JSR #F7D1 6450 :DAYPRINT2 .AS "DAG",#EA 6460 JMP #C55B 6470 :DAYSTRING JSR #C4E1;JSR PCDATE;LDA #16;STA ZP+2;LDA #25;STA ZP+3 6480 LDA ZP;ASL A;ASL A;ASL A;TAX;DEX;LDY @#00 6490 :DAYSTRING1 INX;LDA WEEK,X;STA (ZP+2),Y;INY;CMP @CH" ";BNE DAYSTRING1 6500 LDX @#00;DEY 6510 :DAYSTRING2 LDA DAYPRINT2,X;STA (ZP+2),Y;INY;INX 6520 CPX @3;BNE DAYSTRING2;LDA @#0D;STA (ZP+2),Y;JMP #C55B 6530 :WEEK .AS "ZON MAAN DINS WOENS DONDER VRIJ ZATER " 6540 6550 :CENTER JSR #C4E4;LDA @11;JSR OSBYTE;BCC P-3 6560 LDA @#38;JSR COMMANDO;LDA @10;JSR OSBYTE;JMP #C55B 6570 6575 :MSB JSR #F291;CMP @CH"=";BEQ SEVEN;JMP #C55C 6580 :SEVEN JSR #C4E1;LDA @11;JSR OSBYTE;BCC P-3 6590 LDA @#39;JSR COMMANDO;LDA #16;AND @#01;JSR ZENDBYTE 6600 JSR STACK;LDA @10;JSR OSBYTE;JMP #C55B 6610 6620 :ESCAPE JSR #F291;CMP @CH"=";BEQ ESCAPE1 6624 :ESC_ERROR JMP #C55C 6630 :ESCAPE1 JSR #F291;CMP @CH"O";BNE ESC_ERROR;JSR #F291;CMP @CH"N" 6640 BNE ESCAPE_OFF 6650 LDA @<ESC_ROUT+3;CMP #220;BNE ESC_END 6660 LDA ESC_ROUT+1;STA #220;LDA ESC_ROUT+2;STA #221 6670 :ESC_END JMP #C558 6672 :ESCAPE_OFF CMP @CH"F";BNE ESC_ERROR;JSR #F291 6674 CMP @CH"F";BNE ESC_ERROR 6680 LDA @<ESC_ROUT+3;CMP #220;BEQ ESC_END 6690 LDX @#09 6700 :ESC_COPY LDA NEWOSBYTE,X;STA ESC_ROUT+3,X;DEX;BPL ESC_COPY 6710 PHP;CLI;LDA #220;STA ESC_ROUT+1;LDA #221;STA ESC_ROUT+2 6720 LDA @<ESC_ROUT+3;STA #220;LDA @>ESC_ROUT+3;STA #221;PLP;JMP #C558 6730 \ NIEUWE OSBYTE #01 ROUTINE 6740 :NEWOSBYTE CMP @#01;BEQ P+5;JMP (ESC_ROUT+1) 6750 LDA @#FF;RTS 6760 6780 :MENU JSR #C4E4;PHP;CLI 6790 LDA @<EXIT;STA #224;LDA @>EXIT;STA #225;PLP;JMP (#224) 6800 :EXIT LDX @#00 6810 LDA @<EXIT_ERROR;STA #202;LDA @>EXIT_ERROR;STA #203 6840 :EXIT2 LDA RUN,X;STA #100,X;INX;CMP @#0D;BNE EXIT2 6850 :EXIT1 LDA @#0C;JSR #FFF4;JMP #FFF7 6890 :EXIT_ERROR JSR #F7D1 6900 .BYTE #07,#0A,#0A,#0A,#0A,#0A,#0A 6910 .ASCI " File \ATOM\!BOOT niet gevonden",#0D,#0A,#0A 6920 .ASCI " <ESC> = afbreken, <DRIVE LETTER> = opnieuw proberen " 6930 .BYTE #EA 6940 :EXIT3 JSR #FFE3;LDX @#00;CMP @27;BEQ EXIT4 6945 STA #104;LDA @CH":";STA #105 6950 JMP EXIT1 6960 :EXIT4 JMP #FF3F 6980 :RUN .ASCI "RUN \ATOM\!BOOT",#0D 6982 :LOAD .ASCI "LOAD " 6984 :LOAD1 .ASCI " 2A10",#0D 6990 7000 :ASCLOAD LDA #06;CMP @#01;BEQ ASCLOAD1;LDA @12;LDX @254;JMP OSBYTE 7010 :ASCLOAD1 LDX @#00 7020 :ASCLOAD2 LDA LOAD,X;STA #100,X;INX;CMP @#20;BNE ASCLOAD2 7030 :ASCLOAD3 JSR #F291;CMP @#0D;BEQ ASCLOAD4;STA #100,X;INX;BNE ASCLOAD3 7040 :ASCLOAD4 LDY @#00 7050 :ASCLOAD5 LDA LOAD1,Y;STA #100,X;INX;INY;CMP @#0D;BNE ASCLOAD5 7055 JSR #F7D1 7056 .ASCI "Loading ... ",#EA 7060 JSR #FFF7;JSR #F7D1 7065 .BYTE #0D,#0A 7067 .ASCI "Converting ... ",#EA 7068 LDX @#0F 7070 :ASCLOAD6 LDA #9F,X;STA #2A00,X;DEX;BPL ASCLOAD6 7075\LEESPOINTER=(ZP), SCHRIJFPOINTER=(ZP+2) 7080 LDY @#29;STY ZP+3;INY;STY ZP+1;LDY @#00;STY ZP;STY ZP+2 7090\LEES REGELNUMMER 7100 LDA @#0D;JSR ASCSTORE 7105 :ASCLOAD7 STY ZP+4;STY ZP+5 7110 :ASCLOAD8 JSR ASCLEES;CMP @#20;BEQ ASCLOAD8 7120 :ASCLOAD9 STA ZP+8;SEC;SBC @CH"0";BMI ASCLOAD11 7130 CMP @10;BPL ASCLOAD11;PHA;LDA ZP+4;STA ZP+6;LDA ZP+5;STA ZP+7;LDX @3 7140 :ASCLOAD10 ASL ZP+4;ROL ZP+5;DEX;BNE ASCLOAD10 7150 ASL ZP+6;ROL ZP+7;CLC;PLA 7160 ADC ZP+6;ADC ZP+4;STA ZP+4;LDA ZP+7;ADC ZP+5;STA ZP+5 7170 JSR ASCLEES;JMP ASCLOAD9 7180 :ASCLOAD11 LDA ZP+5;JSR ASCSTORE;LDA ZP+4;JSR ASCSTORE;LDA ZP+8 7190 :ASCLOAD12 JSR ASCSTORE;CMP @#0D;BEQ ASCLOAD13;JSR ASCLEES;JMP ASCLOAD12 7200 :ASCLOAD13 JSR ASCLEES;LDA (ZP),Y;CMP @#1A;BNE ASCLOAD7 7220 LDA @#FF;JSR ASCSTORE;JSR #FFED;JMP #CD9B 7222 :ASCSTORE STA (ZP+2),Y;INC ZP+2;BNE P+4;INC ZP+3;RTS 7224 :ASCLEES LDA (ZP),Y;INC ZP;BNE P+4;INC ZP+1;RTS 7230 7240 :SCAN JSR #C78B;JSR #C231;JSR LEESVAR;PHA;JSR #C4E4;LDY @0 7245 LDA #16;STA ZP+1 7250 LDA @11;JSR OSBYTE;BCC P-3;LDA @58;JSR COMMANDO 7260 :SCAN1 LDA ZP,Y;JSR ZENDBYTE;INY;CPY @8;BNE SCAN1;LDY @0 7270 :SCAN2 JSR LEESBYTE;STA ZP,Y;INY;CPY @8;BNE SCAN2 7272 LDA @10;JSR OSBYTE 7280 PLA;TAX;JSR ZEROVAR;LDA ZP;STA #321,X;LDA ZP+1;STA #33C,X 7290 JSR STACK;JMP #C55B 7300 7301 :VDU3216 JSR #C4E4;LDA @#28;STA #3D9;LDA #4FD;ORA @#20;STA #4FD 7302 LDA #4FF;AND @#0F;ORA #4FD;STA #B888;LDA @#00;STA #3DA 7303 JSR ZENDBYTE;LDA @#60;JSR ZENDBYTE 7310 LDA @#52;STA #208;LDA @#FE;STA #209 7315 LDA @#AF;STA #200;LDA @#EE;STA #201 7320 LDA @#06;JSR #FFF4;LDA @#0C;JSR #FFF4;JMP #C55B 7330 7340 :LPT JSR #F291;CMP @CH"=";BEQ SETPRN;JMP #C55C 7350 :SETPRN JSR #C4E1;LDA @11;JSR OSBYTE;BCC P-3 7360 LDA @62;JSR COMMANDO;LDA #16;AND @#03;JSR ZENDBYTE 7370 JSR LEESBYTE;STA ZP;LDA @10;JSR OSBYTE;JSR STACK;JMP #C55B 7380 7390 :NONMI JSR #C4E4;LDA #4FD;AND @#DF;STA #4FD;LDA #4FF;AND @#0F 7400 ORA #4FD;STA #B888;JMP #C55B 7410 7420 .END 7430 RETURN