8-Bit Software Online Conversion

:2.$.SC_ASS - Listing

2 MODE 7 5 IF PAGE<>&3000 THEN PAGE=&3000:CHA IN"SC`ASS" 10 PROCass 12 *SAVE"SC`MC" 2420 2FFF 13 END 14 15 DEFPROCass 20 FOR I%=0 TO 2 STEP 2 30 P%=11740 40 [OPT I% 50 .page 60 LDA #0:STA 1082 70 LDX #0:LDY #0:JSR tab 80 LDX #3 90 LDA 1083:BEQ forp 100 LDA #82:JSR &FFE3:BNE pgap1 110 .forp LDA #70:JSR &FFE3 120 .pgap1 130 JSR gap 140 LDA 1113:STA 1118 150 .loop1 160 LDA 1118 170 CMP #16:BCC pline:CLC 180 LDX #12:JSR range:BEQ ncol1 190 .pline LDA #124:JSR &FFE3 200 LDX #5:JSR gap 210 LDA 1118:CLC:ADC #&40:JSR &FFE3 220 LDX #5:JSR gap 230 .ncol1 240 LDA 1118:SEC:SBC 1113:CLC 250 CMP #2:BEQ nline1 260 INC 1118:BCC loop1 270 .nline1 280 JSR resetG 290 LDA 1112:STA 1119 300 .loop2 310 LDA 1113:STA 1118 320 LDA 1119 330 CMP #31:BCC cknum1 340 LDX #40:JSR range:BPL nextrow 350 .cknum1 360 CMP #10:BCS nospc 370 LDX #1:JSR gap 380 .nospc 390 JSR hexcon:JSR phex 400 LDX #2:JSR gap 410 LDA &7A:BNE testk1 420 LDA &7B:CMP #&30:BNE testk1 430 LDA 1083:BEQ findk1:JSR missone 440 .findk1 450 LDY 1112:LDX 1113:JSR kcalc 460 .testk1 470 LDA 1069:BNE ft1 480 LDA 1068:BEQ loop3 490 .ft1 JSR findterm 500 .loop3 JSR innerloop 510 .nextrow 520 LDA #0:STA 1069 530 LDA 1119:SEC:SBC 1112:CLC 540 CMP #14:BEQ lastrow 550 INC 1119:BNE loop2 560 .lastrow 570 RTS 580 .innerloop LDX #12 590 LDA 1118:CMP #16:BCC ploop2 600 CLC:JSR range:BCC nextcol 610 .ploop2 620 LDY #0:LDA #32:JSR &FFE3:DEX 630 .ploop3 JSR incG:LDA (&7A),Y 640 CMP #124:BNE ploop4:JSR gap 650 BCC nextcol 660 .ploop4 670 CMP #39:BNE ploop5 680 JSR incG:LDA (&7A),Y 690 .repeat 700 JSR &FFE3:DEX:BNE repeat 710 JSR incG:BCC nextcol 720 .ploop5 730 JSR &FFE3:DEX:BNE ploop6 740 JSR missone:BCC nextcol 750 .ploop6 760 JSR incG:LDA (&7A),Y 770 CMP #124:BNE ploop5 780 JSR gap 790 .nextcol 800 JSR missone 810 LDA 1118:SEC:SBC 1113:CLC 820 CMP #2:BEQ lastcol 830 INC 1118:BCC innerloop 840 .lastcol 850 LDA 1113:CMP #14:BCS ploop8 860 LDA #24:STA 1068:BCC ploop9 870 .ploop8 880 LDA #15:SBC 1113:ASL A 890 STA 1068:LDA #28:SEC 900 SBC 1068:STA 1068:CLC 910 .ploop9 920 RTS 930 .incG 940 INC &7A:BNE incGno:INC &7B 950 .incGno 960 RTS 970 .gap 980 PHA 990 .gap1 1000 LDA #32:JSR &FFE3 1010 DEX:BNE gap1 1020 PLA:RTS 1030 .tab 1040 PHA:LDA #31:JSR &FFEE 1050 TXA:JSR &FFEE 1060 TYA:JSR &FFEE:PLA 1070 RTS 1080 .range 1090 LDA #42:JSR &FFE3 1100 DEX:BNE range 1110 RTS 1120 .resetG 1130 LDA #0:STA &7A 1140 LDA #&30:STA &7B 1150 RTS 1160 .hexcon 1170 TAX 1180 BEQ zero1 1190 LDA #0 1200 SED 1210 CLC 1220 .back 1230 ADC #1:CLC:DEX 1240 BNE back 1250 CLD 1260 RTS 1270 .phex 1280 TAX 1290 LSR A 1300 LSR A 1310 LSR A 1320 LSR A 1330 BEQ notens 1340 CLC:ADC #&30:JSR &FFE3 1350 .notens 1360 TXA:AND #&0F 1370 .zero1 1380 CLC:ADC #&30:JSR &FFE3 1390 RTS 1400 .missone 1410 LDA 1118:CMP #16:BCS mol3 1420 .mol1 1430 JSR incG 1440 LDY #0:LDA (&7A),Y:CMP #124 1450 BNE mol1 1460 .mol3 1470 CLC:RTS 1480 .kcalc 1490 LDA #0:STA 1068:STA 1069 1500 .kcall1 DEY:BEQ kcall2 1510 LDA 1068:CLC:ADC #30:STA 1068 1520 BCC kcall1:INC 1069:CLC 1530 BCC kcall1 1540 .kcall2 DEX:BEQ kcall3 1550 LDA 1068:CLC:ADC #2:STA 1068 1560 BCC kcall2:INC 1069:CLC 1570 BCC kcall2 1580 .kcall3 CLC:RTS 1590 .findterm 1600 JSR incG 1610 .find1 LDY #0:LDA (&7A),Y 1620 CMP #124:BNE findterm 1630 LDA 1068:BNE find2:DEC 1069 1640 .find2 DEC 1068:BNE findterm 1650 LDA 1069:BEQ find3:BNE findterm 1660 .find3 1670 LDA &7A:STA &7E 1680 LDA &7B:STA &7F 1690 CLC:RTS 1700 ] 1710 NEXT 1720 2000 REM *SAVE"MOVE.MC" 2BCA 2DDB 2010 FOR I%=0 TO 2 STEP 2 2020 P%=11210 2030 [OPT I% 2040 .findbox 2050 JSR &2F60 2060 LDA 1083:BEQ fb1:JSR &2F8F 2070 .fb1 2080 LDA &7A:STA &7E 2090 LDA &7B:STA &7F 2100 JSR findk 2110 LDA #0:STA &75:JSR loadA 2120 RTS 2130 .findk 2140 LDY 1114:LDX 1115:JSR &2FA3 2150 LDA 1069:BNE fk1 2160 LDA 1068:BEQ fk2 2170 .fk1 JSR &2FD5 2180 .fk2 RTS 2190 .loadA 2200 LDY #0:LDA (&7A),Y 2210 .ldA1 INY 2220 LDA (&7A),Y:STA (&73),Y 2230 CMP #124:BNE ldA1 2240 DEY:STY &75 2250 RTS 2260 .printA 2270 LDY #0:LDA (&7A),Y 2280 JSR &FFE3:JSR &2F35 2290 LDA (&7A),Y:CMP #124 2300 BNE printA:RTS 2310 .printspc 2320 LDA #32:JSR &FFE3 2330 DEX:BNE printspc 2340 RTS 2350 .printL 2360 LDY #0:LDX &78:BNE pL1:RTS 2370 .pL1 2380 INY:LDA (&76),Y:JSR &FFEE 2390 TYA:CMP &78:BCC pL1 2400 CLC:RTS 2410 .move 2420 LDY 1116:LDX 1117:JSR &2F47 2430 TAY 2440 LDA #32:JSR &FFE3 2450 LDA #8:JSR &FFE3 2460 TYA 2470 CMP #136:BNE m1 2480 LDY #4:CPY 1117:BCS m4 2490 LDA 1117:SEC:SBC #12:STA 1117 2500 LDA #0:BEQ mck 2510 .m1 CLC 2520 CMP #137:BNE m2 2530 LDY 1117:CPY #28:BCS m4 2540 LDY 1115:CPY #15:BCS m4 2550 LDA 1117:ADC #12:STA 1117 2560 LDA #0:BEQ mck 2570 .m2 CLC 2580 CMP #138:BNE m3 2590 LDY 1116:CPY #15:BCS m4 2600 LDY 1114:CPY #30:BCS m4 2610 INC 1116:LDA #0:BEQ mck 2620 .m3 CLC 2630 CMP #139:BNE m4 2640 LDY #1:CPY 1116:BCS m4 2650 DEC 1116:LDA #0 2660 .mck CLC 2670 CMP #0:BEQ resetflag 2680 .m4 CLC 2690 CMP #136:BNE m5 2700 LDY #1:CPY 1113:BCS resetflag 2710 DEC 1113:BCC setflag 2720 .m5 CLC 2730 CMP #137:BNE m6 2740 LDY 1113:CPY #13:BCS resetflag 2750 INC 1113:BCC setflag 2760 .m6 CLC 2770 CMP #138:BNE m7 2780 LDY 1112:CPY #16:BCS resetflag 2790 INC 1112:BCC setflag 2800 .m7 CLC 2810 CMP #139:BNE resetflag 2820 LDY #1:CPY 1112:BCS resetflag 2830 DEC 1112 2840 .setflag 2850 LDA #&FF:STA 1082:BNE setcol 2860 .resetflag 2870 LDA #0:STA 1082 2880 .setcol 2890 LDY #0:LDA 1117 2900 .sc1 2910 SEC:SBC #12:BMI sc2 2920 INY:BPL sc1 2930 .sc2 2940 TYA:CLC 2950 ADC 1113:STA 1115 2960 LDA 1116:CLC:ADC 1112 2970 STA 1114:DEC 1114 2980 RTS 2990 .addtoline 3000 LDY &78:CPY #38:BCC al1 3010 CLC:RTS 3020 .al1 3030 INY:STY &78 3040 STA (&76),Y:RTS 3050 .delete 3060 LDY &78:BNE dl1:RTS 3070 .dl1 3080 DEY:STY &78:RTS 3090 .edit 3100 LDY #0:LDA &75:BNE e1 3110 STA &78:RTS 3120 .e1 3130 INY:LDA (&73),Y:STA (&76),Y 3140 STY &78:CPY &75:BCC e1 3150 CLC:RTS 3160 .changeflag 3170 LDA 1083:BEQ cf1 3180 LDA #0:BEQ cf2 3190 .cf1 LDA #&FF 3200 .cf2 STA 1083 3210 LDA &FF:STA 1082:RTS 3220 .incM 3230 INC &7C:BNE incMno:INC &7D 3240 .incMno RTS 3250 .reformat 3260 LDA #0:STA &80 3270 LDA #&30:STA &81:LDY #0 3280 .r1 3290 LDA #124:STA (&80),Y 3300 INC &80:BNE r2:INC &81 3310 .r2 3320 LDA &81:CMP #&33:BCC r1 3330 LDA &80:CMP #134:BCC r1:CLC 3340 .setup 3350 LDA #&10:STA &70 3360 LDA #&30:STA &73 3370 LDA #&60:STA &76 3380 LDA #&0C:STA &71 3390 STA &74:STA &77 3400 LDA #0:STA 1083 3410 STA &72:STA &75:STA &78 3420 .home 3430 LDA #1:STA 1112:STA 1113 3440 STA 1114:STA 1115 3450 .home2 3460 LDA #1:STA 1116:LDA #4:STA 1117 3470 LDA #0:STA 1118:STA 1119 3480 LDA #&FF:STA 1082:RTS 3490 ] 3500 NEXT 3510 4000 REM *SAVE"INSERT.MC" 2960 2BC9 4010 A%=10592 4020 FOR I%=0 TO 2 STEP 2 4030 P%=A% 4040 [OPT I% 4050 .insertcontrol 4060 LDA 1083:BNE sizecheck 4070 JSR sizecheck 4080 LDA #&FF:STA 1083 4090 JSR &2BCA:JSR &2F8F 4100 JSR insertcontrol 4110 LDA #0:STA 1083:RTS 4120 .sizecheck 4130 LDA &78:BNE sz1:RTS 4140 .sz1 4150 CMP &75:BNE sz2:JSR equal:BCC sz4 4160 .sz2 4170 BCC sz3:JSR greater:BCC sz4 4180 .sz3 4190 JSR lesser 4200 .sz4 4210 LDA #&FF:STA 1082:RTS 4220 .equal 4230 LDA &7E:STA &7C 4240 LDA &7F:STA &7D:LDY #1 4250 .eq1 CLC 4260 LDA (&76),Y:STA (&7C),Y 4270 INY:STY &72 4280 LDA &78:CMP &72:BCS eq1 4290 RTS 4300 .greater 4310 LDA &78:SEC:SBC &75 4320 CLC:STA &72:ADC &80 4330 STA &7C:STA &88 4340 LDA #0:ADC &81:CLC 4350 STA &7D:STA &89:LDY #0 4360 .g1 4370 LDA (&80),Y:STA (&7C),Y 4380 LDA &80:BNE g2:DEC &81 4390 .g2 DEC &80 4400 LDA &7C:BNE g3:DEC &7D 4410 .g3 DEC &7C 4420 LDA &7C:CMP &7A:BNE g1 4430 LDA &7B:CMP &7D:BCC g1 4440 LDA &88:STA &80 4450 LDA &89:STA &81 4460 LDA &7A:CLC:ADC &72:STA &7A 4470 LDA #0:ADC &7B:STA &7B 4480 JMP equal 4490 .lesser 4500 LDA &75:SEC:SBC &78:STA &72 4510 LDA &7A:SEC:SBC &72 4520 STA &7C:STA &88 4530 LDA &7B:SBC #0 4540 STA &7D:STA &89:CLC 4550 JSR closegap 4560 LDA &88:STA &7A 4570 LDA &89:STA &7B 4580 JMP equal 4590 .closegap 4600 LDY #0 4610 LDA (&7A),Y:STA (&7C),Y 4620 JSR &2D6C:JSR &2F35 4630 LDA &80:CMP &7A:BCS closegap 4640 LDA &7B:CMP &81:BCC closegap 4650 LDA &7C:STA &80 4660 LDA &7D:STA &81 4670 RTS 4680 .errortrap 4690 LDA #0:STA 1082 4700 LDA 1115 4710 CLC:CMP #1:BCC error 4720 LDA #15 4730 CLC:CMP 1115:BCC error 4740 LDA 1114 4750 CLC:CMP #1:BCC error 4760 LDA #30 4770 CLC:CMP 1114:BCC error:RTS 4780 .error 4790 LDA #&FF:STA 1082:RTS 4800 .print 4810 LDY #0 4820 PLA:STA &88 4830 PLA:STA &89 4840 .pt1 4850 INY:LDA (&88),Y 4860 JSR &FFEE:BNE pt1 4870 TYA:CLC:ADC &88:STA &88 4880 BCC pt2:INC &89 4890 .pt2 4900 LDA &89:PHA 4910 LDA &88:PHA:RTS 4920 .setrdz 4930 LDA #&10:STA &0C05 4940 LDA #&0C:STA &0C06 4950 LDA #&03:STA &0C07 4960 LDA #&30:STA &0C08 4970 LDA #&4F:STA &0C09 4980 LDX #&05:LDY #&0C:RTS 4990 .mkc 5000 LDA 1114:JSR &2F69:LDY #0 5010 TAX:LSR A:LSR A:LSR A:LSR A 5020 BEQ notens 5030 CLC:ADC #&30:INY:STA (&70),Y 5040 .notens 5050 TXA:AND #&0F 5060 CLC:ADC #&30:INY:STA (&70),Y 5070 LDA #13:INY:STA (&70),Y 5080 LDA 1115:CLC:ADC #&40 5090 LDY #0:STA (&70),Y 5100 RTS 5110 .prep 5120 LDA #4:STA &84:STA &86 5130 LDA #88:STA &83 5140 LDA #96:STA &85:RTS 5150 .vw`xy 5160 JSR prep:LDY #7 5170 .vw`xy1 5180 LDA (&83),Y:STA (&85),Y 5190 DEY:BPL vw`xy1:RTS 5200 .xy`vw 5210 JSR prep:LDY #7 5220 .xy`vw1 5230 LDA (&85),Y:STA (&83),Y 5240 DEY:BPL xy`vw1:RTS 5250 .z`l 5260 LDX #0 5270 .tr1 5280 LDA &0C10,X:CMP #13:BEQ tr2 5290 LDY &78:INY:STY &78 5300 STA (&76),Y:INX:BNE tr1 5310 .tr2 5320 LDY &78:INY:STY &78 5330 LDA #58:STA (&76),Y 5340 LDX #1:LDY #19:JSR &2F47 5350 JSR &2D2A 5360 LDX #40:JSR &2C21 5370 RTS 5380 .blank 5390 LDA 1110:STA 1096 5400 .blank1 5410 LDA 1096:STA 1114:JSR &2F60 5420 LDA 1108:STA 1115:JSR findterm 5430 LDA &7A:STA &7C 5440 LDA &7B:STA &7D 5450 JSR &2F60:JSR &2F8F 5460 LDA 1109:STA 1115:JSR findterm 5470 JSR &2F8F:LDA 1108:STA 1097 5480 .blank2 5490 JSR stm:JSR stm 5500 INC 1097:CLC 5510 LDA 1109:CMP 1097:BCS blank2 5520 LDA &7A:CMP &7C:BNE nte 5530 LDA &7B:CMP &7D:BEQ eq 5540 .nte 5550 JSR closegap 5560 .eq 5570 INC 1096:CLC 5580 LDA 1111:CMP 1096:BCS blank1 5590 JSR xy`vw 5600 LDA #0:CLC:RTS 5610 .findterm 5620 LDY 1114:LDX 1115:JSR &2FA3 5630 LDA 1069:BNE ft 5640 LDA 1068:BNE ft:RTS 5650 .ft 5660 JSR &2FD5:RTS 5670 .stm 5680 JSR &2D6C:LDY #0 5690 LDA #124:STA (&7C),Y:RTS 5700 ] 5710 NEXT 5720 5730 6000 REM *SAVE"MAIN.MC" 25E4 295F 6005 A%=9700 6010 FOR I%=0 TO 2 STEP 2 6015 P%=A% 6020 [OPT I% 6025 .start 6030 LDA #0:STA 1092:STA &8F 6035 JSR loop1 6040 CMP #92:BNE start:RTS 6045 .loop1 6050 LDA 1082:BEQ nopage:JSR &2DDC 6055 .nopage 6060 LDX #0:LDY #17:JSR &2F47 6065 LDA 1115:CLC:ADC #&40:JSR &FFE3 6070 LDA 1114:JSR &2F69:JSR &2F78 6075 LDA #32:JSR &FFE3:JSR &2BCA 6080 LDX #4:LDY #17:JSR &2F47 6085 JSR &2C10 6090 LDX #70:JSR &2C21 6095 .pl 6100 LDX #0:LDY #19:JSR &2F47 6105 LDA #124:JSR &FFE3 6110 LDA &78:BEQ np1:JSR &2C2A 6115 .np1 6120 LDA #95:JSR &FFE3 6125 LDX #40:JSR &2C21 6130 LDX 1117:LDY 1116:JSR &2F47 6135 LDA #62:JSR &FFE3 6140 LDA #8:JSR &FFE3 6145 JSR &2AB7 6150 JSR read1:CLC 6155 .rc 6160 CMP #127:BNE notdel:JSR &2D39 6165 JMP pl 6170 .notdel 6175 CMP #13:BNE notenter 6180 LDX 1092:BEQ enter:RTS 6185 .enter JSR &2960 6190 LDA #0:STA &78:RTS 6195 .notenter 6200 CMP #61:BNE notshift 6205 JSR shift:RTS 6210 .notshift 6215 CMP #92:BNE notret:RTS 6220 .notret 6225 CMP #135:BNE ckin1:JSR &2DB3 6230 RTS 6235 .ckin1 6240 BCC ckin2:JSR &2C3E 6245 LDA #0:RTS 6250 .ckin2 6255 CMP #39:BNE notrepeat 6260 JSR repeat:RTS 6265 .notrepeat 6270 CMP #32:BCS ckin3:RTS 6275 .ckin3 6280 CLC:CMP #126:BCC ckin4:CLC:RTS 6285 .ckin4 6290 JSR &2D2B:RTS 6295 .read1 6300 JSR &FFE0:CMP #27:BNE notesc1 6305 LDA #126:JSR &FFF4:JMP esc1 6310 .notesc1 RTS 6315 .esc1 6320 JSR esc2 6325 LDA &8F 6330 CMP #67:BNE ep2:JMP Cescrep 6335 .ep2 6340 CMP #66:BNE ep3:JMP Bescrep 6345 .ep3 6350 RTS 6355 .shift CLC 6360 LDX #4:LDY #17:JSR &2F47 6365 JSR &2A78 6370 EQUS"Shift to (C-L)":EQUB0 6375 LDX #40:JSR &2C21 6380 LDX #18:LDY #17:JSR &2F47 6385 .inz 6390 LDA #15:LDX #0:LDY #0:JSR &FFF4 6395 .inz1 6400 JSR rdz:JSR &2A4C 6405 CMP #&FF:BEQ shift 6410 JMP &2DC1 6415 .rdz 6420 JSR &2A99 6425 LDA #0:JSR &FFF1:BCC notesc2 6430 CLC:JMP esc2 6435 .notesc2 6440 LDY #0:LDA (&70),Y 6445 CMP #13:BNE ntc:JSR &2AB7 6450 .ntc 6455 CLC:CMP #57:BCC nocol 6460 SBC #&40:CLC 6465 STA 1115:STA 1113 6470 INY:LDA (&70),Y 6475 .nocol 6480 SEC:SBC #&30 6485 INY:LDX &0C10,Y 6490 CPX #13:BEQ rdz2 6495 TAX:LDA #0 6500 .rdz1 6505 CLC:ADC #10:DEX:BNE rdz1 6510 ADC (&70),Y:SEC:SBC #&30 6515 .rdz2 6520 STA 1114:STA 1112 6525 CLC:RTS 6530 .esc2 6535 LDA #17:STA 1092 6540 LDX #0:LDY #21:JSR &2F47 6545 JSR &2A78 6550 EQUS"ESCAPE":EQUB0 6555 JSR &2AF4 6560 .e1 JSR loop1 6565 CMP #13:BNE e1 6570 JSR &2B0E 6575 LDA 1114:STA 1110 6580 LDA 1115:STA 1108 6585 .e2 JSR loop1 6590 CMP #13:BNE e2 6595 JSR &2B0E 6600 LDA 1114:STA 1111 6605 LDA 1115:STA 1109 6610 JSR &2C3E:JSR &2B01 6615 LDX #0:LDY #21:JSR &2F47 6620 LDX #39:JSR &2C21 6625 LDA #0:STA 1092:RTS 6630 .read 6635 JSR &FFE0:CMP #27:BNE notesc 6640 LDA #126:JSR &FFF4:JMP esc 6645 .notesc RTS 6650 .esc 6655 LDA #0:STA 1082:JMP rp3 6660 .repeat 6665 LDX #0:LDY #21:JSR &2F47 6670 LDA #39:JSR &FFEE 6675 LDA #63:JSR &FFEE 6680 JSR read 6685 CMP #32:BCS ok1:JMP rp3 6690 .ok1 6695 CMP #126:BCC ok:JMP rp3 6700 .ok 6705 LDX #0:LDY #21:JSR &2F47:TAX 6710 LDA #39:JSR &FFEE 6715 LDY #1:STA (&76),Y 6720 TXA:JSR &FFEE:INY 6725 STA (&76),Y:STY &78 6730 LDA #0:STA 1083:JSR &2960 6735 LDA #&FF:STA 1082 6740 .rp3 6745 LDA #0:STA &78 6750 LDX #0:LDY #21:JSR &2F47 6755 LDX #39:JSR &2C21 6760 LDA #&FF:RTS 6765 .copy 6770 LDA #67:STA &8F 6775 TSX:STX &79 6780 JSR &2AF4:JSR bdl 6785 EQUS"COPY ":EQUB0 6790 LDX #1:LDY #19:JSR &2F47 6795 LDY #0:JSR &2C31 6800 JSR sub1 6805 LDA 1114:STA 1130 6810 LDA 1115:STA 1131 6815 JSR &2B01:JSR sub1 6820 LDA 1114:STA 1110 6825 LDA 1115:STA 1108 6830 JSR &2B01:JSR sub1 6835 LDA 1114:STA 1111 6840 LDA 1115:STA 1109 6845 .Cescrep 6850 JSR &2B01 6855 LDA 1130:STA 1114 6860 LDA 1131:STA 1115 6865 JSR &2BCA:JSR &2D42 6870 LDA 1110:STA 1096 6875 .cl1 CLC 6880 LDA 1096:STA 1114 6885 JSR reploop 6890 INC 1096 6895 LDA 1111:CMP 1096:BCS cl1 6900 JSR &2B01 6905 LDA #&FF:STA 1082 6910 LDA #0:STA &78 6915 LDX &79:TXS:RTS 6920 .reploop 6925 LDA 1108:STA 1097 6930 .rep1 6935 LDA 1097:STA 1115 6940 JSR &2BCA:JSR &2F8F 6945 JSR &2960:INC 1097 6950 LDA 1109:CMP 1097:BCS rep1 6955 RTS 6960 .sub1 6965 LDX #1:LDY #19:JSR &2F47 6970 LDY #0:JSR &2C31 6975 JSR rdz:JSR &2B0E 6980 RTS 6985 .bdl 6990 LDX #1 6995 PLA:STA &88 7000 PLA:STA &89 7005 .pt1 7010 TXA:TAY:LDA (&88),Y:BEQ pt2 7015 JSR &2D2B:INX:BNE pt1 7020 .pt2 7025 TXA:CLC:ADC &88:STA &88 7030 BCC pt3:INC &89:CLC 7035 .pt3 7040 LDA &89:PHA 7045 LDA &88:PHA:RTS 7050 .blank 7055 LDA #66:STA &8F 7060 TSX:STX &79 7065 JSR &2AF4:JSR bdl 7070 EQUS"Blank ":EQUB0 7075 JSR sub1 7080 LDA 1114:STA 1110 7085 LDA 1115:STA 1108 7090 JSR sub1 7095 LDA 1114:STA 1111 7100 LDA 1115:STA 1109 7105 .Bescrep 7110 JSR &2B01 7115 LDA #0:STA &78:JSR &2B3A 7120 LDX &79:TXS:RTS 7125 ] 7130 NEXT 7135 7140 8000 *FX4,1 8010 REM *SAVE"COM.MC" 2420 25E2 8020 A%=9248 8030 FOR I%=0 TO 2 STEP 2 8040 P%=A% 8050 [OPT I% 8060 .com1 8070 LDA #0:STA &78 8080 JSR vdu 8090 LDA #21:JSR &FFEE 8100 LDX #0:LDY #5:JSR &2F47 8110 JSR &2A78 8120 EQUS"┬ŻA,B,C,E,F,L,R,S " 8130 EQUB0 8140 JSR &FFE0:CMP #27:BNE c1 8150LDA #126:JSR &FFF4:RTS 8160 .c1 PHA 8170 LDX #0:LDY #5:JSR &2F47 8180 LDX #39:JSR &2C21:PLA 8190 CMP #135:BEQ com2 8200 CMP #65:BNE s1:RTS 8210 .s1 8220 CMP #69:BNE c2 8230 JSR &2D42:JMP com3 8240 .c2 8250 CMP #70:BNE c3:JSR &2D58 8260 .c3 8270 CMP #76:BNE c4:JSR load 8280 .c4 8290 CMP #82:BNE c9:JSR reformat 8300 .c9 8310 CMP #83:BNE c5:JSR save 8320 .c5 8330 CMP #135:BEQ com1 8340 .com2 8350 PHA:JSR vdu 8360 LDA #5:JSR &FFEE:PLA 8370 CMP #66:BNE c6:JSR &291B 8380 .c6 8390 CMP #67:BNE c7:JSR &282F 8400 .c7 8410 LDX #0:LDY #21:JSR &2F47 8420 LDX #39:JSR &2C21 8430 LDA #&FF:STA 1082 8440 .com3 8450 JSR vdu 8460 LDA #5:JSR &FFEE 8470 JSR &25E4 8480 JMP com1 8490 .vdu 8500 LDA #28:JSR &FFEE 8510 LDA #0:JSR &FFEE 8520 LDA #27:JSR &FFEE 8530 LDA #39:JSR &FFEE 8540 RTS 8550 .reformat 8560 LDX #0:LDY #5:JSR &2F47 8570 JSR &2A78 8580 EQUS"ARE YOU SURE Y/N " 8590 EQUB0 8600 JSR &27BB 8610 CMP #89:BNE ne:JSR &2D73 8620 INC &80:BNE nc1:INC &81:CLC 8630 .nc1 8640 LDY #0:LDA #&FF:STA (&80),Y 8650 .ne 8660 LDA #0:RTS 8670 .findT 8680 LDA #&30:STA &81:LDY #0 8690 .lf1 8700 LDA (&80),Y:CMP #&FF:BEQ lf3 8710 INC &80:BNE lf2:INC &81:CLC 8720 .lf2 BCC lf1 8730 .lf3 RTS 8740 .save 8750 LDA #12:JSR &FFEE 8760 LDX #0:LDY #1:JSR &2F47 8770 JSR &2A78 8780 EQUS"SAVE ":EQUB0 8790 JSR set:BCS ret 8800 LDY #11:STA (&7A),Y 8810 JSR findT:CLC 8820 LDA #1:ADC &80 8830 LDY #14:STA (&7A),Y 8840 LDA #0:ADC &81 8850 LDY #15:STA (&7A),Y 8860 LDX #&E2:LDY #&02 8870 LDA #0:JSR &FFDD 8880 .ret CLC 8890 LDA #12:JSR &FFEE:RTS 8900 .load 8910 LDA #12:JSR &FFEE 8920 LDX #0:LDY #1:JSR &2F47 8930 JSR &2A78 8940 EQUS"LOAD ":EQUB0 8950 JSR set:BCS ret 8960 LDX #&E2:LDY #&02 8970 LDA #&FF:JSR &FFDD 8980 JSR findT 8990 BEQ ret 9000 .set 9010 JSR name:BCC t1 9020 LDA #0:STA &FF:RTS 9030 .t1 9040 LDA #&E2:STA &7A 9050 LDA #&02:STA &7B 9060 LDA #0:LDY #17 9070 .t2 9080 STA (&7A),Y:DEY:BNE t2 9090 LDA #&10:STA (&7A),Y:INY 9100 LDA #&0C:STA (&7A),Y 9110 LDA #&30:LDY #3:STA (&7A),Y 9120 LDY #7:STA (&7A),Y:RTS 9130 .name 9140 JSR &2A99 9150 LDA #10:STA &0C07 9160 LDA #32:STA &0C08 9170 LDA #126:STA &0C09 9180 CLC:LDA #0:JSR &FFF1:RTS 9190 ] NEXT 9210 ENDPROC