10 REM ********************* 20 REM * BRANQUART-SOS * 30 REM * ORGINELE VERSIE: * 40 REM * TH.DEN EXTER * 50 REM * UITGEBREID DOOR: * 60 REM * ROLAND LEURS * 70 REM * REQUIRED: SALFAA * 80 REM ********************* 100 P.$6$12 110 P."GARFIELD ATOM OPERATING SYSTEM V3.04"'' 120 P."BRANQUART SOS"'' 130 P."AUTEURS: THEO DEN EXTER"' 140 P." ROLAND LEURS"'' 150 REM IS P-CHARME IN SOS 160 REM STRAKS AANWEZIG? 170 $#100="YES" 180 ASM-VERSIE 190 !#1000=0 200 P."CLEANING SPACE"' 210 F.N=#1000TO#19FF S.4 220 !N=#FFFFFFFF;N. 230 PASS2;P.'" PASS1"';GOS.a 240 PASS1;P." PASS2"';GOS.a 250 REM WAKE-UP SOS 270 ?#1000=#40 280 ?#1001=#BF 310 ?#4FF=0;?#B888=#C0 320 @=0 330 P.'"CODE: #1000-" 340 P.&P&#FFFF'' 350 END 360 370a ASM-BEGIN OF ASSEMBLY 380 390 (* **??** IN TE STELLEN 400 DOOR DE GEBRUIKER 410 **!!** EXTRA FACILIT. 420 MAX=AANTAL ROM'S 430 *) 440 450.TABLE #8200,#9FFF 460.OPTION #40 470 480\ **SCHAKELGEGEVENS** 490:LATCH =#B888 500:SCHADUW =#4FF 505:SCHADUW1 =#4FD 510:MAX =8 520:ROM'PCHARME=0 530:ZPBASE =#90 540:ZPLENGTH =#10 550:TYPE'RD'ZP =#FD 560:TYPE'WR'ZP =#E4 570 580\ **WORKAREA** 590 \**??** 600:BASE=#400 610:BRKLOW=BASE 620:BRKHIGH=BRKLOW+1 630:BRKROM=BRKHIGH+1 640:STARTROM=BRKROM+1 650:TEMP=STARTROM+1 660:VECTOR=TEMP 670:DUMP=TEMP+1 680:VECTAB=(MAX)*(ZPLENGTH)+DUMP+1 700:SUB'ACCU=(VECTAB)+1+20*3 710:SUB'STATUS=SUB'ACCU+1 720:SUB'Y=SUB'STATUS+1 730:SUB'X=SUB'Y+1 740:STACKPOINTER=SUB'X 750:SUBVECTOR=SUB'X+1 760:INTVECTOR=SUBVECTOR+2 770:INT'ACCU=INTVECTOR+2 780:INT'STATUS1=INT'ACCU+1 790:INT'STATUS2=INT'STATUS1+1 800:INT'X=INT'STATUS2+1 810:INT'Y=INT'X+1 820:OPT'PCHARME=INT'Y+1\**!!* 830:FREE=OPT'PCHARME+1 840 850:BRK=#202 860:TEXT=#F7D1 870:WRCH=#FFF4 880:RDCH=#FFE3 890:CR=#D 900:LF=#A 910:DELIM=#EA 920 930\ **START ASSEMBLY** 940:ORIGIN=#1000 950.CODE ORIGIN 960 BRK;BRK 970 (* ENTRY IN SYSTEM *) 980:ENTRY 990:LABEL8 BIT SCHADUW 1000 BVC NOT'LOCKED \LOCKED? 1010 JMP LOCKED 1020 1030 (* NOT LOCKED SEARCH *) 1040:NOT'LOCKED LDA SCHADUW 1050 STA STARTROM 1060 JSR UPDATE'VECTORS 1070 JSR SWITCH'CONTEXT'OUT 1080 LDA BRK+1 1090 CMP@(HANDLER)/256 1100 BEQ LABEL1 1110 STA BRKHIGH 1120 LDA BRK 1130 STA BRKLOW 1140 LDA SCHADUW 1150 STA BRKROM 1160:LABEL1 JMP SWITCH 1170 1180 (* TRY NEXT BOX *) 1190:NEXT'BOX INC SCHADUW 1200 LDA SCHADUW 1210 AND @#F;ORA SCHADUW1;STA LATCH 1215 AND @#0F 1220 CMP@(MAX) 1230 BNE LABEL2 1240 LDA@0 1250 STA SCHADUW 1260 AND @#F;ORA SCHADUW1;STA LATCH 1270:LABEL2 1280 JSR SWITCH'CONTEXT'IN 1290 LDA SCHADUW 1300 CMP STARTROM 1310 BNE SWITCH 1320 JMP NOT'FOUND 1330:SWITCH LDA@(HANDLER)/256 1340 STA BRK+1 1350 LDA@(HANDLER)%256 1360 STA BRK 1370 LDA#A000 1380 CMP@#40 1390 BNE NEXT'BOX 1400 LDA#A001 1410 CMP@#BF 1420 BNE NEXT'BOX 1430 JMP#A002 1440 1450 (* CENTRAL BRK HANDLER *) 1460:HANDLER PLA 1470 STA TEMP 1480 PLA 1490 STA 0 1500 BIT SCHADUW \LOCKED? 1510 BVC NOT'LOCKED'ERROR 1520 JMP LOCKED'ERROR 1530:NOT'LOCKED'ERROR CMP@94 1540 BNE NOT'ERROR'94 1550 LDY#5E \RENUM. **!!** 1560 LDA (5),Y 1570 CMP@CH"." 1580 BNE LABEL99 1590 JMP NOT'FOUND 1600:LABEL99 LDX@#FF 1610 TXS 1620 JMP NEXT'BOX 1630 1640 (* FUNCTION CHECK *) 1650:NOT'ERROR'94 1660 LDA BRKLOW 1670 STA BRK 1680 LDA BRKHIGH 1690 STA BRK+1 1700 LDA0 1710 CMP@174 \ERROR 174 1720 BEQ INSTALL 1730 CMP@29 \ERROR 29 1740 BNE NOT'INSTALL 1750 1760 (* INSTALL FAKE CALLER *) 1770:INSTALL TSX 1780 STX STACKPOINTER 1790 LDX@#FF 1800:LB1 LDA#100,X 1810 CPX STACKPOINTER 1820 BCC NOT'INSTALL 1830 BEQ NOT'INSTALL 1840 DEX 1850 DEX 1860 AND@#F0 1870 CMP@#A0 1880 BEQ LB1 1890 CPX@#FD \NO A-BLOK? 1900 BEQ NOT'INSTALL 1910 TXA 1920 CLC 1930 ADC@3 1940 STA STACKPOINTER 1950 PHA 1960 PHA 1970 PHA 1980 TSX 1990:LB2 LDA#103,X 2000 STA#100,X 2010 INX 2020 CPX STACKPOINTER 2030 BNE LB2 2040 LDA STACKPOINTER 2050 TAX 2060 DEX 2070 LDA SCHADUW 2080 STA#100,X 2090 DEX 2100 LDA@(SWITCH'BACK-1)/256 2110 STA#100,X 2120 LDA@(SWITCH'BACK-1)%256 2130 DEX 2140 STA#100,X 2150:NOT'INSTALL 2160 JSR SWITCH'CONTEXT'OUT 2170 JSR UPDATE'VECTORS 2180 LDA BRKROM 2190 STA SCHADUW 2200 AND @#F;ORA SCHADUW1;STA LATCH 2210 JSR SWITCH'CONTEXT'IN 2220 2230 (* TERMINATE SEARCH *) 2240 LDA 0 2250 PHA 2260 LDA TEMP 2270 PHA 2280 JMP(BRK) 2290 2300:LOCKED'ERROR LDA SCHADUW 2310 STA BRKROM 2320 LDA 0 2330 CMP@94 \ERROR 94 2340 BEQ LABEL3 2350 JMP NOT'ERROR'94 2360:LABEL3 LDX@#FF 2370 TXS 2380 JMP NOT'FOUND 2390 2400 (* SWAP ZEROPAGE OUT 2410 #91-#98 ALWAYS 2420 *) 2430:SWITCH'CONTEXT'OUT 2440 LDA SCHADUW 2450 AND@#F 2460 TAX 2470 INX 2480 LDA@0 2490:LABEL4 CLC 2500 ADC@ZPLENGTH 2510 DEX 2520 BNE LABEL4 2530 LDX@(ZPLENGTH)-1 2540 TAY 2550 DEY 2560:LABEL5 LDA ZPBASE,X 2570 STA DUMP,Y 2580 DEY 2590 DEX 2600 BPL LABEL5 2610 RTS 2620 2630 (* SWAP ZEROPAGE IN 2640 #91-#98 ALWAYS 2650 *) 2660:SWITCH'CONTEXT'IN 2670 LDA SCHADUW 2680 AND@#F 2690 TAX 2700 INX 2710 LDA@0 2720:LABEL6 CLC 2730 ADC@ZPLENGTH 2740 DEX 2750 BNE LABEL6 2760 LDX@(ZPLENGTH)-1 2770 TAY 2780 DEY 2790:LABEL7 LDA DUMP,Y 2800 STA ZPBASE,X 2810 DEY 2820 DEX 2830 BPL LABEL7 2840 RTS 2850 2860 (* START SEARCH LOCKED *) 2870:LOCKED LDA BRK+1 2880 CMP@(HANDLER)/256 2890 BEQ LABEL21 2900 STA BRKHIGH 2910 LDA BRK 2920 STA BRKLOW 2930 LDA@(HANDLER)/256 2940 STA BRK+1 2950 LDA@(HANDLER)%256 2960 STA BRK 2970 LDA SCHADUW 2980 STA BRKROM 2990:LABEL21 LDA#A000 3000 CMP@#40 3010 BNE TRAP'ERROR 3020 LDA#A001 3030 CMP@#BF 3040 BNE TRAP'ERROR 3050 JMP#A002 3060:TRAP'ERROR JMP#C558 3070 3080 (* NOT FOUND IN BOXES 3090 TRY OWN TABLE 3100 IF NOT FOUND IN TABLE 3110 TRY BY ORIGINAL BRK 3120 *) 3130:NOT'FOUND LDA BRKLOW 3140 STA BRK 3150 LDA BRKHIGH 3160 STA BRK+1 3170 JSR SWITCH'CONTEXT'OUT 3180 LDA BRKROM 3190 STA SCHADUW 3200 AND @#F;ORA SCHADUW1;STA LATCH 3210 JSR SWITCH'CONTEXT'IN 3220 LDX@#FF 3230:NEXT'STATEMENT LDY#5E 3240 LDA(5),Y 3250 CMP@CH"." 3260 BNE LABEL54 3270:TRAP'ERROR'94 JMP#C558 3280:LABEL54 DEY 3290:NEXT'CHAR INX 3300 INY 3310:LABEL12 LDA TABLE,X 3320 CMP@#FF 3330 BEQ TRAP'ERROR'94 3340:LABEL15 CMP@#FE 3350 BEQ LABEL14 3360 CMP(5),Y 3370 BEQ NEXT'CHAR 3380 DEX 3390 LDA (5),Y 3400 CMP@CH"." 3410 BEQ LABEL100 3420:LABEL13 INX 3430 LDA TABLE,X 3440 CMP@#FE 3450 BNE LABEL13 3460 INX 3470 INX 3480 JMP NEXT'STATEMENT 3490:LABEL100 INX 3500 LDA TABLE,X 3510 CMP@#FE 3520 BNE LABEL100 3530 INY 3540:LABEL14 LDA TABLE+1,X 3550 STA#53 3560 LDA TABLE+2,X 3570 STA#52 3580 STY3 3590 LDX4 3600 JMP(#FF0052) 3610 3620 (* OWN COMMANDS *) 3630:SYSV LDA #6;CMP @1;BEQ SYSV1;JMP SYSV2 3640:SYSV1 JSR #C4E4;JSR TEXT 3650.BYTE 12,CR,LF,#EA 3660 LDA @0;JSR #FFC2;JSR TEXT 3670.BYTE CR,LF,LF 3680.ASCII "Branquart SOS v3.04" 3690.BYTE CR,LF,LF 3720.ASCII " (c) 1985 Theo den Exter" 3730.BYTE CR,LF 3740.ASCII " (c) 1985 Charl de Moor" 3750.BYTE CR,LF 3780.ASCII " (c) 1993-1997 Roland Leurs" 3790.BYTE CR,LF,LF 3800.ASCII "Geassembleerd op 7 september 1997" 3810.BYTE CR,LF,LF 3812 LDA @#00;STA #00 3813 LDA @#0D;JSR #FFC2 3820 JMP SYEND 3830:SYSTEM JSR#C4E4 3840 JSR TEXT 3850.BYTE 12,CR,LF,LF 3860.ASCII "SCHAKEL OPERATING SYSTEEM:" 3870.BYTE CR,LF,LF,DELIM 3880 LDX@#00;LDY@0 3890:PRST 3900 LDA TABLE+21,X 3910 BMI PRADR 3920 JSRWRCH;INY;INX;BNEPRST 3930:PRADR 3940 CMP@#FF;BEQSYEND 3950 JSR #F99A;LDY@0 3960 INX;LDA TABLE+21,X 3970 JSR#F802 3980 INX;LDA TABLE+21,X 3990 JSR#F802 4000 INX;JSR#FFED;JMPPRST 4010:SYEND 4020 JSR#FFED 4030 JMP#C55B 4040:SBYTE \ROM STAT 4050 JSR #C4E4;JSR TEXT 4060 .ASCII "Eprom ",#EA 4070 LDA SCHADUW 4080 JSR #F80B;LDA SCHADUW 4090 AND @#40;BEQ SB1 4100 JSR TEXT 4110 .ASCII " (vast)",DELIM 4120:SB1 JSR#FFED;JSR TEXT 4121 .AS "Operating Systeem in ram",DELIM 4122 LDA SCHADUW1;AND @#80;BNE SB2;JSR TEXT 4123 .BY #08,#08,CH"o",DELIM 4124 :SB2 JSR TEXT;.BY #0D,#0A 4125 .AS "Video interrupt ",DELIM 4126 LDA SCHADUW1;AND @#20;BEQ SB3;JSR TEXT 4127 .AS "niet ",#EA 4128 :SB3 JSR TEXT;.AS "geblokkeerd",CR,LF,DELIM 4129 JMP WP_END+5 4130 4140:ROM JSR#C4E1 4150 JSR UPDATE'VECTORS 4160 LDX#04 4170 DEX 4180 STX#4 4190 LDA#16,X 4200 AND@#F 4210 JMP LOCK1 4220:LOCK JSR#C4E1 4230 JSR UPDATE'VECTORS 4240 LDX4 4250 DEX 4260 STX4 4270 LDA#16,X 4280 AND@#F 4290 ORA@#40 4300:LOCK1 4310 STA SCHADUW 4320 AND @#F;ORA SCHADUW1;STA LATCH 4330 LDA#A000 4340 CMP@#40 4350 BNE LABEL9 4360 LDA#A001 4370 CMP@#BF 4380 BEQ LABEL20 4390:LABEL9 JSR TEXT 4400.ASCII "GEEN ROM AANWEZIG" 4410.BYTE CR,LF,DELIM 4420:LABEL20 LDA BRKROM 4430 ORA@#40 4440 CMP SCHADUW 4450 BEQ LABEL60 4460 LDA@#D8 \INSTALL ORIG. 4470 STA BRK \BRK HANDLER 4480 LDA@#C9 4490 STA BRK+1 4500:LABEL60 JMP#C55B 4510 4520:UNLOCK JSR #C4E4 4530 LDA SCHADUW 4540 AND@#F 4550 STA SCHADUW 4560 AND @#F;ORA SCHADUW1;STA LATCH 4570 JMP#C55B 4580 4590.IF $#100="NO";.GOTO 4800 4600:PCOM LDA 6 \DIR. MODE? 4610 CMP@#01 4620 BNE LABEL53 4630 LDA SCHADUW \PCH LOCKED? 4640 CMP@(ROM'PCHARME):#40 4650 BEQ LABEL55 4660 BIT SCHADUW \LOCKED? 4670 BVC LABEL51 4680:LABEL53 JMP#C558 4690:LABEL51 LDA SCHADUW 4700 CMP@(ROM'PCHARME):#40 4710 BEQ LABEL55 4720 JSR SWITCH'CONTEXT'OUT 4730 LDA@(ROM'PCHARME) 4740 STA SCHADUW 4750 AND @#F;ORA SCHADUW1;STA LATCH 4760 JSR SWITCH'CONTEXT'IN 4770:LABEL55 JSR#A42E 4780 JMP#C31B 4790 4800:HEX JSR #C90A 4810 JSR#C4E4 4820 LDA6 \DIR. MODE? 4830 CMP@#01 4840 BEQ LABEL52 4850 JMP #C558 4860:LABEL52 DEY 4870 LDA#52 4880 STA#12 4890 STA#55 4900 LDA(#54),Y 4910 CMP@CR 4920 BNE P+5 4930 JMP#CD9B 4940 JMP#C2B6 4955:WP \ WRITE PROTECT ON/OFF 4960 JSR #F291;CMP @CH"O";BNE WP_END 4965 JSR #F291;CMP @CH"N";BEQ WP_ON 4970 CMP @CH"F";BNE WP_ERR;JSR #F291 4975 CMP @CH"F";BNE WP_ERR;LDA SCHADUW1 4980 AND@:10111111;JMP WP_SWITCH 4985:WP_ON LDA SCHADUW1;ORA @:01000000 4990:WP_SWITCH STA SCHADUW1;LDA SCHADUW;AND @#0F 4995 AND @#F;ORA SCHADUW1;STA LATCH;INC #03 5000:WP_END DEC#03;JSR #C4E4;JSR TEXT 5005 .AS "Write protect is ",DELIM 5010 LDA SCHADUW1;AND @:01000000;BEQ WP_OFF 5015 JSR TEXT;.AS "aan.",DELIM;JMP WP_EXIT 5020:WP_OFF JSR TEXT;.AS "uit.",DELIM 5025:WP_EXIT JSR #FFED;JMP #C55B 5030:WP_ERR JMP #FA85 \ ERROR 135 5130:EXIT 5140 LDA @6;JMP#FFC2 5150 5160:OSV 5170 JSRTEXT 5180.BYTE #06,#0C,LF,LF 5190.ASCII " OPERATING SYSTEEM VECTOREN:" 5200.BYTE CR,LF,LF,DELIM 5210 LDX@#00;STX#90 5220:OSVL1 LDY@#00 5230:OSVL2 5240 LDA OSVT,Y;JSRWRCH 5250 CPX@#02;BEQOSVL4;INX 5260:OSVL3 5270 INY;JMPOSVL2 5280:OSVL4 5290 STY#91;JSRTEXT 5300.ASCII "VEC :",DELIM 5310 INC#90;LDX#90 5320 LDA#200,X;JSR#F802 5330 DEC#90;LDX#90 5340 LDA#200,X;JSR#F802 5350 INC#90;INC#90 5360 JSRTEXT 5370.ASCII " ",DELIM 5380 LDX@#00;LDY#91 5390 CPY@#38;BEQOSVL5 5400 JMPOSVL3 5410:OSVT 5420.ASCII "NMIBRKIRQCOMWRCRDCLODSAVRDRSPRBGTBPTFNDSHTRDBWRBBYTJOYEXT" 5430:OSVL5 5431 JSR TEXT 5432 .ASCII "PLTVEC :",DELIM 5433 LDA #3FF;JSR#F802;LDA#3FE;JSR#F802 5440 JSR#FFED;JMP#C55B 5450 5460 (* TABLE OF COMMANDS *) 5470:TABLE 5480.ASCII "FUNC",#FE 5490.BYTE (PCOM)/256 5500.BYTE (PCOM)%256 5510.ASCII "SYST",#FE 5520.BYTE (SYSTEM)/256 5530.BYTE (SYSTEM)%256 5540.ASCII "SYSV",#FE 5550.BYTE (SYSV)/256 5560.BYTE (SYSV)%256 5570.ASCII "LATCH",#FE 5580.BYTE (SBYTE)/256 5590.BYTE (SBYTE)%256 5600.ASCII "LOCK",#FE 5610.BYTE (LOCK)/256 5620.BYTE (LOCK)%256 5630.ASCII "UNLOCK",#FE 5640.BYTE(UNLOCK)/256 5650.BYTE(UNLOCK)%256 5660.ASCII "CHIP",#FE 5670.BYTE (ROM)/256 5680.BYTE (ROM)%256 5690.ASCII "EXIT",#FE 5700.BYTE (EXIT)/256 5710.BYTE (EXIT)%256 5720.ASCII "QJ",#FE 5730.BYTE (HEX)/256 5740.BYTE (HEX)%256 5780.ASCII "WP",#FE 5790.BYTE (WP)/256 5800.BYTE (WP)%256 5810.ASCII "OSV",#FE 5820.BYTE (OSV)/256 5830.BYTE (OSV)%256 5832.ASCII "XMS",#FE 5834.BYTE (XMS)/256 5836.BYTE (XMS)%256 5840.BYTE #FF 5850 5860 (* CHECK VECTORS 5870 TRY TO SWITCH A-BLOK 5880 VECTOR 5890 *) 5900:UPDATE'VECTORS 5910 PHP 5920 SEI 5930 LDX@0 5940 LDY@0 5950:LABEL30 LDA#201,X 5960 AND@#F0 5970 CMP@#A0 5980 BNE LABEL31 5990 CPX@2 \BRK VECTOR 6000 BEQ LABEL31 6010 LDA#200,X 6020 STA VECTAB+1,Y 6030 LDA#201,X 6040 STA VECTAB,Y 6050 LDA SCHADUW 6060 STA VECTAB+2,Y 6070 TXA 6080 ASLA 6090 ASLA 6100 CLC 6110 ADC@(VECENTRY)%256 6120 STA #200,X 6130 LDA@(VECENTRY)/256 6140 ADC@0 6150 STA #201,X 6160:LABEL31 INX 6170 INX 6180 INY 6190 INY 6200 INY 6210 CPX@(19*2) \ (NO OF VECTORS)*2 6220 BNE LABEL30 6230 LDA#3FF \PLOT VECTOR 6235 AND @#F0 6240 CMP@#A0 6250 BNE LABEL32 6260 LDA#3FF 6270 STA VECTAB,Y 6280 LDA#3FE 6290 STA VECTAB+1,Y 6300 LDA@(VECENTRY+19*8)/256 6310 STA#3FF 6320 LDA@(VECENTRY+19*8)%256 6330 STA#3FE 6340 LDA SCHADUW 6350 STA VECTAB+2,Y 6360:LABEL32 PLP 6370 RTS 6380 6390 (* ENTR. VECTOR PATHWAYS 6400 *) 6410:VECENTRY 6420 JSR ISAVE;LDX@00;JMP IJOB 6430 NOP;NOP;NOP;NOP;NOP 6440 JMP#C558 6450 JSR ISAVE;LDX@06;JMP IJOB 6460 JSR SAVE;LDX@09;JMP JOB 6470 JSR SAVE;LDX@12;JMP JOB 6480 JSR SAVE;LDX@15;JMP JOB 6490 JSR SAVE;LDX@18;JMP JOB 6500 JSR SAVE;LDX@21;JMP JOB 6510 JSR SAVE;LDX@24;JMP JOB 6520 JSR SAVE;LDX@27;JMP JOB 6530 JSR SAVE;LDX@30;JMP JOB 6540 JSR SAVE;LDX@33;JMP JOB 6550 JSR SAVE;LDX@36;JMP JOB 6560 JSR SAVE;LDX@39;JMP JOB 6570 JSR SAVE;LDX@42;JMP JOB 6571 JSR SAVE;LDX@45;JMP JOB 6572 JSR SAVE;LDX@48;JMP JOB 6573 JSR SAVE;LDX@51;JMP JOB 6574 JSR SAVE;LDX@54;JMP JOB 6575 JSR SAVE;LDX@57;JMP JOB 6580 6590:SAVE PHP 6600 STA SUB'ACCU 6610 PLA 6620 STA SUB'STATUS 6630 STX SUB'X 6640 STY SUB'Y 6650 RTS 6660 6670:ISAVE PHP 6680 STA INT'ACCU 6690 PLA 6700 STA INT'STATUS1 6710 STX INT'X 6720 STY INT'Y 6730 RTS 6740 6750:LOAD LDY SUB'Y 6760 LDX SUB'X 6770 LDA SUB'STATUS 6780 PHA 6790 LDA SUB'ACCU 6800 PLP 6810 RTS 6820 6830:ILOAD LDX INT'Y 6840 LDA INT'Y 6850 LDA INT'STATUS1 6860 PHA 6870 LDA INT'ACCU 6880 PLP 6890 RTS 6900 6910 (* INTERRUPT SWITCHING 6920 PATHWAY 6930 *) 6940:IJOB PLA 6950 STA INT'ACCU 6960 PLA 6970 PHA 6980 STA INT'STATUS2 6990 LDA SCHADUW 7000 PHA 7010 LDA VECTAB+2,X 7020 STA SCHADUW 7030 AND @#F;ORA SCHADUW1;STA LATCH 7040 LDA VECTAB,X 7050 STA INTVECTOR+1 7060 LDA VECTAB+1,X 7070 STA INTVECTOR 7080 LDA@(IENTRY)/256 7090 PHA 7100 LDA@(IENTRY)%256 7110 PHA 7120 LDA INT'STATUS2 7130 PHA 7140 LDA INT'ACCU 7150 PHA 7160 JSR ILOAD 7170 JMP(INTVECTOR) 7180 7190:IENTRY JSR ISAVE 7200 PLA 7210 STA SCHADUW 7220 AND @#F;ORA SCHADUW1;STA LATCH 7230 PLP 7240 LDA INT'STATUS2 7250 PHA 7260 JSR ILOAD 7270 RTI 7280 7290 (* NON INTER. SWITCHING 7300 PATHWAY 7310 *) 7320:JOB STX VECTOR 7330 TXA 7340 PHA 7350 LDA #60 \SAVE OPTIE PCH 7360 STA OPT'PCHARME \**!!** 7370 LDA VECTAB+2,X 7380 CMP SCHADUW 7390 BEQ SHORT'EXECUTION 7400 CPX@21 \ SAVE FILE 7410 BNE LABEL40 7420 JSR UPDATE'VECTORS\**!!** 7430 LDX VECTOR 7440:LABEL40 CPX@30 \GET CYTE 7450 BEQ SHORT'EXECUTION 7460 CPX@33 \PUT BYTE 7470 BEQ SHORT'EXECUTION 7480 JSR SWITCH'CONTEXT'OUT 7490 LDX VECTOR 7500 LDA SCHADUW 7510 PHA 7520 LDA VECTAB+1,X 7530 STA SUBVECTOR 7540 LDA VECTAB,X 7550 STA SUBVECTOR+1 7560 LDA VECTAB+2,X 7570 STA SCHADUW 7580 AND @#F;ORA SCHADUW1;STA LATCH 7590 JSR SWITCH'CONTEXT'IN 7600 JSR LOAD 7610 JSR P+6 7620 JMP P+6 7630 JMP (SUBVECTOR) 7640 JSR SAVE 7650 JSR SWITCH'CONTEXT'OUT 7660 PLA 7670 STA SCHADUW 7680 AND @#F;ORA SCHADUW1;STA LATCH 7690 JSR SWITCH'CONTEXT'IN 7700 LDA OPT'PCHARME \**!!** 7710 STA #60 7720 PLA 7730 CMP@21 \SAVE FILE? 7740 BNE LB10 7750 LDA VECTAB+13 7760 CMP@#CE \ED64 OUTCHAR? 7770 BNE LB10 7780 LDA@#CE \**!!** 7790 STA#208 7800 LDA@#AC 7810 STA#209 7820:LB10 JSR LOAD 7830 RTS 7840 7850 (* NO-SWITCH. PATHWAY *) 7860:SHORT'EXECUTION PLA 7870 LDX VECTOR 7880 LDA SCHADUW 7890 PHA 7900 LDA VECTAB+2,X 7910 STA SCHADUW 7920 AND @#F;ORA SCHADUW1;STA LATCH 7930 LDA VECTAB,X 7940 STA SUBVECTOR+1 7950 LDA VECTAB+1,X 7960 STA SUBVECTOR 7970 JSR LOAD 7980 JSR P+6 7990 JMP P+6 8000 JMP (SUBVECTOR) 8010 JSR SAVE 8020 PLA 8030 STA SCHADUW 8040 AND @#F;ORA SCHADUW1;STA LATCH 8050 LDA OPT'PCHARME \**!!** 8060 STA #60 8070 JSR LOAD 8080 RTS 8090 8100 (* FAKE EXPRES. CALLER *) 8110:SWITCH'BACK JSR SAVE 8120 JSR SWITCH'CONTEXT'OUT 8130 PLA 8140 STA SCHADUW 8150 AND @#F;ORA SCHADUW1;STA LATCH 8160 JSR SWITCH'CONTEXT'IN 8170 LDA@(HANDLER)/256 \REINIT 8180 STA BRK+1 \HANDLER 8190 LDA@(HANDLER)%256 8200 STA BRK 8210 JSR LOAD 8220 RTS 8221:PRDEC 8222 LDX @#00;STX #04;STA #16;STX #25;STX #34;STX #43 8223 LDA #321;PHA;LDA @#00;STA #321 8224 JSR #C589;PLA;STA #321;RTS 8230 \ SYSV IN PROGRAMMA 8235:SYSV2 JSR #C78B;JSR #F291;JSR #C4E1;LDX@0;STX#4 8240:SYSV3 LDA @#0B;JSR#FFC2;BCC SYSV3;LDA @#00;JSR #FFC8 8245 LDA @#46;JSR #FFC8;JSR #FFC5;TAY;JSR #FFC5 8250 PHA;LDA @#0A;JSR #FFC2;PLA;CMP #16;BEQ SYSV4;BCS SYSV5;BCC SYSVERR 8255:SYSV4 CPY #17;BEQ SYSV5;BCC SYSVERR 8257:SYSV5 JMP #C55B 8260:SYSVERR JSR TEXT 8265 .AS "Minimaal terminal versie ",DELIM 8270 LDA #17;PHA;LDA #16;JSR PRDEC;LDA @CH".";JSR #FFF4;PLA;JSR PRDEC 8275 JSR TEXT 8277 .AS " voor dit programma vereist.",DELIM 8280 LDA @#0C;LDX @94;JMP #FFC2 \ ERROR94 GENEREREN 8300 \ XMS STATEMENT 8305:XMS JSR #F291;PHA;;JSR #C231;JSR #C4E1;LDX @0;STX #4 8310 PLA;CMP@CH"I";BEQ XMSI;CMP@CH"P";BEQ XMSP 8315 CMP@CH"R";BEQ XMSR;CMP@CH"W";BEQ XMSW 8320 LDA @#0C;LDX @94;JMP #FFC2 8325:XMSI LDA @#F4;BNE XMS1 8330:XMSP LDA @#F3;BNE XMS1 8335:XMSR LDA @#F2;BNE XMS1 8340:XMSW LDA @#F1 8345:XMS1 LDY #16;JSR #FFC2;JMP #C55B 9990:END'OF'ASSEMBLY 9991.UNRAVEL 9992.SYMBOL 9993.END OF ASSEMBLY 9994 RETURN