8-Bit Software Online Conversion

Display File Conversion - Listing

10REM This program will split up a mo de 7 *RUN file into one or more Basic 20REM programs. It works by *SPOOLing the original file to disc into a 30REM size you determine by the name you determine. The SPOOLED files must 40REM be converted to BASIC by typing *EX. <filename>. They may then be 50REM saved by <SA.FNS>. The first pr ogram will then CHAIN the next. 60REM There is a function to turn 10 SPOOLED files into BASIC at 70REM the end of this routine. Press F0 after SPOOLing has ended. 80REM As a general rule: Lines no mor e than 5000. The largest *RUN file 90REM needs about 6100 lines. So you should never need more than 2 files. 100REM If you set maximum lines to a l ow figure, you will end up with a lot 110REM of small files to convert. 120DEFFNS="7toBas" 130MODE7 140VDU23;8202;0;0;0; 150F$="Bas" 160M%=5000 170ON ERROR:CLOSE#0:OSCLI"SPOOL":REPOR T:PRINTERL:END 180REPEAT 190CLS 200PRINT'TAB(9)"     220PRINT'TAB(9)" By C.J.Richardson." 230PRINT'" Convert a Mode 7 *RUN file into a" 240PRINT" basic program. See REM lines for info." 250PRINT'" The first file name will be ";F$;"1" 260PRINT" If needed, the next will be ";F$;"2 Etc." 270PRINT'" The file will be split into programs" 280PRINT" with the last line number as ";STR$(M%);"." 290PRINT'TAB(7)" Please enter 1 - 3 " 300PRINT'" 1. Change start file name f rom ";F$;"1" 310PRINT" 2. Change last line number f rom ";STR$(M%) 320PRINT" 3. Start Conversion." 330REPEAT 340A$=GET$ 350UNTILINSTR("123",A$) 360PRINT 370IF A$="1" REPEAT:PRINT" Please ente r first file name."'" No longer than 5 l etters please.":INPUT'F$:UNTILLENF$<6 AN D LENF$>0 380IF A$="2" REPEAT:PRINT" Please ente r the maximum line number"'" for each fi le.":INPUT'M%:UNTIL M%>10 AND M%<32600 A ND M% MOD 10=0 390UNTILA$="3" 400CLS 410*. 420PRINT" Convert which file?" 430INPUTC$ 440F%=OPENIN C$ 450PTR#F%=&E6 460A%=BGET#F% 470IF A%<>&D:PTR#F%=&10C 480L%=1 490REPEAT 500OSCLI"SPOOL "+F$+STR$L% 510PRINT"0DEFFNS=""";F$;STR$(L%);"""" 520PRINT"1MODE7:VDU23;8202;0;0;0;:VDU1 4" 530C%=10 540REPEAT 550PRINTSTR$(C%);"PRINT"""; 560FORJ%=1TO40 570A%=BGET#F% 580VDUA% 590IF A%=34 VDUA% 600NEXT 610PRINT""";" 620C%=C%+10 630UNTILC%=M% OR PTR#F%=EXT #F% 640IF PTR#F%<>EXT #F%:PRINTSTR$(C%);"C HAIN""";F$;STR$(L%+1);"""" 650*SPOOL 660L%=L%+1 670UNTIL PTR#F%=EXT #F% 680CLOSE#F% 690OSCLI"K.0 NEW|M*EX."+F$+"1|MSA.FNS| MNEW|M*EX."+F$+"2|MSA.FNS|MNEW|M*EX."+F$ +"3|MSA.FNS|MNEW|M*EX."+F$+"4|MSA.FNS|MN EW|M*EX."+F$+"5|MSA.FNS|M*FX138 0 129|M" 700OSCLI"K.1 NEW|M*EX."+F$+"6|MSA.FNS| MNEW|M*EX."+F$+"7|MSA.FNS|MNEW|M*EX."+F$ +"8|MSA.FNS|MNEW|M*EX."+F$+"9|MSA.FNS|MN EW|M*EX."+F$+"10|MSA.FNS|M" 710CLS 720PRINT" Now Press F0 to convert"'" S POOLED files to BASIC programs." 730PRINT" TYPE CHAIN """;F$;"1"" to ru n" 740PRINT" Or convert the files yoursel f."