8-Bit Software Online Conversion

:2.$.RE-AS - Listing

1 REM ON ERROR GOTO 30400 10 GOTO 180 15 Y=0 20 FOR X=Y TO Y+10 25 PRINTX;" &";÷X,?X 30 Y=Y+1 35 NEXT 40 INPUT Z:IF Z<>0 THEN Y=Z 45 GOTO 20 50 *SAVE"RENUM" 53FC 5700 55 END 60 REM EXAPLES 65 GOTO 65 70 GOSUB 70 75 ON A GOTO 65,70,75,80 80 ON A GOSUB 65,70,75,80 85 RESTORE 75 90 IF A=1 THEN 65 ELSE 75 180 VDU15 190 S%=&53FC 200 FOR I=0 TO 2 STEP 2 210 P%=S% 220[OPT I 230 TSX:STX Exit+1 240 JSR Print 250 EQUS"START LINE ? ":EQUB0 260 JSR Input 270 TXA:BNE ST1 280 TYA:BNE ST1 290 LDX (PAGE+2):LDY (PAGE+1) 300 .ST1 310 STX Store+8:STY Store+9 320 JSR Print 330 EQUS"NEW START LINE ? ":EQUB0 340 JSR Input 350 TXA:BNE ST2 360 TYA:BNE ST2 370 LDX Store+8:LDY Store+9 380 .ST2 390 STX Store+10:STY Store+11 400 JSR Print 410 EQUS"STOP LINE ? ":EQUB0 420 JSR Input 430 STX Store+12:STY Store+13 440 JSR Print 450 EQUS"LINE SPACING ? ":EQUB0 460 JSR Input 470 TXA:BNE ST3 480 TYA:BNE ST3 490 LDX #10 500 .ST3 510 STX Store+14:STY Store+15 520 LDA Store+12:BNE Prog 530 LDA Store+13:BNE Prog 540 LDA #47:STA Store+12 550 LDA #117:STA Store+13 560 JSR Nsearch 570 LDX #2 580 LDY #0 590 .Af 600 LDA &80 610 BNE Ag 620 DEC &81 630 .Ag 640 DEC &80 650 LDA (&80),Y 660 CMP #13 670 BNE Af 680 DEX 690 BNE Af 700 INY 710 LDA (&80),Y 720 STA Store+13 730 INY 740 LDA (&80),Y 750 STA Store+12 760 .Prog 770 LDA #1 780 STA &80 790 LDA #PAGE DIV &100 800 STA &81 810 .Loop 820 LDA &80 830 STA &82 840 STA &84 850 LDA &81 860 STA &83 870 STA &85 880 JSR Inchl 890 JSR Inchl 900 JSR Inchl 910 .Gsearch 920 LDY #0 930 LDA (&84),Y 940 CMP #141 950 BEQ Gnum 960 CMP #13 970 BEQ Eol 980 JSR Inchl 990 JMP Gsearch 1000 .Gnum 1010 JSR StoreN 1020 JSR Nsearch 1030 JMP Gsearch 1040 .Eol 1050 LDA &82 1060 STA &80 1070 LDA &83 1080 STA &81 1090 LDX #12 1100 JSR Cknum 1110 BEQ Cnum 1120 LDY #1 1130 JSR Nline 1140 JMP Loop 1150 .Cnum 1160 LDA Store+10 1170 STA Store+4 1180 LDA Store+11 1190 STA Store+5 1200 JSR Sstart 1210 .BA 1220 LDX #12 1230 JSR Cknum 1240 BEQ BB 1250 JSR Exchange 1260 JSR Nline 1270 LDA Store+14 1280 CLC 1290 ADC Store+4 1300 STA Store+4 1310 LDA Store+15 1320 ADC Store+5 1330 STA Store+5 1340 CLC 1350 BCC BA 1360 .BB 1370 JSR Exchange 1380 RTS 1390 .Exchange 1400 LDY #0 1410 LDA Store+5 1420 STA (&80),Y 1430 INY 1440 LDA Store+4 1450 STA (&80),Y 1460 RTS 1470 .StoreN 1480 LDY #0 1490 JSR Inchl 1500 LDA (&84),Y 1510 ASL A 1520 ASL A 1530 TAX 1540 AND #192 1550 INY 1560 EOR (&84),Y 1570 STA Store+6 1580 TXA 1590 ASL A 1600 ASL A 1610 INY 1620 EOR (&84),Y 1630 STA Store+7 1640 RTS 1650 .Inchl 1660 INC &84 1670 BNE Cz 1680 INC &85 1690 .Cz 1700 RTS 1710 .Swap 1720 LDA Store+5 1730 PHA 1740 ORA #64 1750 LDY #2 1760 STA (&84),Y 1770 LDA Store+4 1780 PHA 1790 AND #63 1800 ORA #64 1810 DEY 1820 STA (&84),Y 1830 PLA 1840 AND #192 1850 STA &7C 1860 PLA 1870 AND #192 1880 LSR A 1890 LSR A 1900 ORA &7C 1910 LSR A 1920 LSR A 1930 EOR #84 1940 DEY 1950 STA (&84),Y 1960 RTS 1970 .Nsearch 1980 JSR Sstart 1990 LDA Store+10 2000 STA Store+4 2010 LDA Store+11 2020 STA Store+5 2030 .Ac 2040 LDX #6 2050 JSR Cknum 2060 BNE Ad 2070 JSR Swap 2080 .Ad 2090 LDY #1 2100 JSR Nline 2110 LDA Store+14 2120 CLC 2130 ADC Store+4 2140 STA Store+4 2150 LDA Store+15 2160 ADC Store+5 2170 STA Store+5 2180 LDX #12 2190 JSR Cknum 2200 BNE Ac 2210 LDX #6 2220 JSR Cknum 2230 BNE Ae 2240 JSR Swap 2250 .Ae RTS 2260 .Nline 2270 INY 2280 LDA (&80),Y 2290 CLC 2300 ADC &80 2310 STA &80 2320 LDA #0 2330 ADC &81 2340 STA &81 2350 CLC 2360 RTS 2370 .Cknum 2380 LDY #1 2390 LDA (&80),Y 2400 CMP Store,X 2410 BNE Ab 2420 DEY 2430 INX 2440 LDA (&80),Y 2450 CMP Store,X 2460 RTS 2470 .Sstart 2480 LDA #1 2490 STA &80 2500 LDA #PAGE DIV &100 2510 STA &81 2520 .Aa 2530 LDX #8 2540 JSR Cknum 2550 BEQ Ab 2560 LDY #1 2570 JSR Nline 2580 BCC Aa 2590 .Ab RTS 2600 .Print 2610 JSR &FFE7:LDY #0 2620 PLA:STA Pr1+2 2630 PLA:STA Pr1+3 2640 .Pr1 2650 INY:LDA &FFFF,Y 2660 JSR &FFE3:BNE Pr1 2670 TYA:CLC:ADC Pr1+2 2680 TAX:BCC Pr2:INC Pr1+3 2690 .Pr2 2700 LDA Pr1+3:PHA 2710 TXA:PHA:RTS 2720 .Inputblock 2730 EQUB Store MOD 256 2740 EQUB Store DIV 256 2750 EQUB 5 2760 EQUB 48 2770 EQUB 57 2780 .Input 2790 LDX #Inputblock MOD 256 2800 LDY #Inputblock DIV 256 2810 LDA #0:JSR &FFF1 2820 BCS Exit 2830 LDY #0:STA Store+6:STA Store+7 2840 .Cget 2850 LDA Store,Y 2860 CMP #&0D:BNE Cget1 2870 LDX Store+6:LDY Store+7:RTS 2880 .Cget1 2890 ½ *10 2900 JSR Multtwo 2910 LDA Store+7:PHA 2920 LDA Store+6:PHA 2930 JSR Multtwo:JSR Multtwo 2940 CLC:PLA:ADC Store+6:STA Store+6 2950 PLA:ADC Store+7:STA Store+7 2960 ½ 2970 LDA Store,Y 2980 AND #&0F:CLC 2990 ADC Store+6:STA Store+6:BCC Cget2 3000 INC Store+7 3010 .Cget2 3020 INY:JMP Cget 3030 .Multtwo 3040 ASL Store+6:ROL Store+7:RTS 3050 .Exit 3060 LDX #&FF:TXS:RTS ½DUMMY 3070 .Store 3080 ] 3090 NEXT 3100 CALL S% 3110 FOR N=Store TO Store+20 STEP 2 3120 PRINT?N;",";N?1 3130 NEXT 29999 END 30000 30100 MESSAGE$="TXT-MC" 30101 MODE 4 30102 VDU28,0,27,39,5,:CLS 30105 VDU19,0,4,0,0,0 30110 *FX4,1 30115 S%=&5000:BYTE%=32 30120 PROCcheck:*FX4,0:END 30125 30200 MESSAGE$="DBUG-MC" 30205 S%=&4E20:BYTE%=76 30210 PROCcheck:END 30215 30300 REM **CALL &4CCE FOR 1/50 SEC 30305 REM **CALL &4CF8 FOR 1/100 SEC 30310 REM MESSAGE$="TRAC-MC" 30320 REM S%=&4BA2:BYTE%=32 30330 REM PROCcheck:END 30340 30400 REM SEE VARIABLES 30402 VDU14 30410 PROC`LVAR 30412 VDU15 30420 END 30430 30500 MESSAGE$="RE-MC" 30505 S%=&53FC:BYTE%=186 30510 !&8D=S%:PROCcheck:END 30515 30950 DEFPROCcheck 30952 X%=&C00 30955 IF ?S%<>BYTE% THEN PROCoscli("L."+ MESSAGE$) 30960 CALL S%:ENDPROC 30965 30999 REM BREAK KEY 31000 MODE 7 31020 END 31080 32000 REM FKEYS 32002 *KEY0"GOTO 32500 |M" 32005 *KEY1"GOTO 30100 |M" 32010 *KEY2"GOTO 30200 |M" 32012 *KEY3"GOTO 30300 |M" 32014 *KEY4"GOTO 30400 |M" 32015 *KEY5"GOTO 30500 |M" 32025 *KEY10"OLD |M GOTO 31000 |M" 32026 END 32027 32030 DEFPROC`LVAR 32040 LOCAL a%,z%,s%,l%,p%,t%,f$ 32050 a%=&482:z%=&4F4:s%=&4B8 32060 ON ERROR OFF 32070 *FX229,0 32080 *FX4,0 32090 *FX12,0 32100 VDU 7,3,6,14,12 32110 PRINT"Last errror was " 32120 REPORT:PRINT; " at line "ERL 32130 PRINT 32140 FOR l%=a% TO z% STEP 2 32150 IF l%=s%-2 l%=&4BC:GOTO 32200 32160 p%=?l%+256*l%?1 32170 IF p%=0 THEN 32200 32180 f$=CHR$((l%-a%)/2+65) 32190 PROClvar(p%,f$) 32200 NEXT 32202 PRINT'"RESIDENT INTEGER VARIABLES" ' 32210 FOR l%=1 TO 26:f$=CHR$(64+l%)+"%" 32220 p%=EVAL(f$) 32222 PRINT,f$"=";p%," &";÷p% 32224 NEXT:PRINT 32230 ENDPROC 32240 32250 DEFPROClvar(o%,a$) 32260 LOCAL d%,f$ 32270 f$=a$ 32280 d%=2 32290 REPEAT 32300 a$=a$+CHR$(o%?d%) 32310 d%=d%+1 32320 UNTIL o%?(d%-1)=0 32330 a$=LEFT$(a$,d%-2) 32340 IF INSTR("a%a$d%f$l%o%p%s%t%z%",a$ )<>0 THEN t%=0 ELSE t%=-1 32350 IF RIGHT$(a$,1)="(" THEN a$=LEFT$( a$,LEN(a$)-1)+" = array":GOTO 32380 32360 IF RIGHT$(a$,1)="$" THEN a$=a$+" = "+EVAL(a$):GOTO 32380 32370 a$=a$+" = "+STR$(EVAL(a$))+" &"+ STR$÷(EVAL(a$)) 32380 IF t% PRINT TAB(15-INSTR(a$,"="))a $ 32390 IF o%?1<>0 THEN PROClvar(?o%+256*o %?1,f$) 32400 ENDPROC 32490 32500 REM CONVERT H-D D-H 32502 PROCin:END 32504 DEFPROCin 32506 LOCAL a$,l% 32508 VDU11 32510 INPUT"ENTER NUMBER "a$ 32512 VDU11,11 32514 l%=LEN(a$) 32516 PRINT'TAB(10-l%)a$" = "; 32520 IF MID$(a$,1,1)<>"&" THEN PRINT"&" ;÷VAL(a$); ELSE PROCH`D 32525 PRINTVAL(a$)DIV256;",";VAL(a$)MOD2 56 32530 PRINT 32532 ENDPROC 32550 DEFPROCH`D 32552 LOCAL a%,d%,f$ 32555 a%=0 32560 FOR d%=l%-2 TO 0 STEP -1 32570 f$=MID$(a$,l%-d%,1) 32580 a%=a%+(ASC(f$)-48+(f$>"9")*7)*16^d % 32582 NEXT 32584 a$=STR$(a%):PRINTa$; 32590 ENDPROC 32599 32600 DEFPROCoscli ($X%):Y%=X%DIV256:CAL L&FFF7:ENDPROC