start bastext 4909 start tok128 d64-cqJfb0 0 REM scratch"booter.128.80":esave"booter.128.80" 10 REM ****************************************************************-v1.1-** 11 REM * * 12 REM * booter.128 * 13 REM * ========== * 14 REM * * 15 REM * this program lets you autoboot your commodore 128 disk programs! * 16 REM * select if the program should be started with "boot" or "run". * 17 REM * * 18 REM * (c)copyright 1993: peter karlsson / softwolves software 1993 * 19 REM * * 20 REM ************************************************************************ 25 IFRWINDOW(2)<>80THENPRINT"this is the 80 column version":END 50 em$=CHR$(.) 100 COLOR6,9:COLOR5,7 110 PRINT"{home*2}{clear}{ct n}Booter.128{space*11}A Softwolves Software Release in 1993{space*14}Freeware"; 111 PRINT"{142}{E*80}" 112 WINDOW0,2,79,24 113 z=PEEK(186) 120 PRINT"{ct n}Please insert the disk which you wish to autoboot into drive #"z"{left}." 121 PRINT"Press:{space*2} or to confirm your choice." 122 PRINTSPC(8)"<1> to change device number." 123 PRINTSPC(8)"<2> to see the disk directory.":PRINTSPC(8)"<3> to validate the disk." 124 DO:GETKEYa$:LOOPUNTILINSTR(CHR$(13)+"123",a$)<>0 125 ONINSTR(CHR$(13)+"123",a$)GOTO130,126,129,128 126 INPUT"Please give the new device number";z 127 CHECKz:IFst<>0ORz<8ORz>15THENPRINT"Illegal device number, please reselct.":GOTO126 128 COLLECTONu(z):GOTO120 129 DIRECTORYONu(z):GOTO120 130 PRINT"{down}Checking if boot sector is available{.*3}" 131 OPEN15,z,15,"i0":IFds>20THEN9999:ELSEOPEN2,z,2,"#" 132 PRINT#15,"b-a 0 1 0":IFds=65THENBEGIN 133 PRINT"Boot sector already allocated, checking if it is an old boot sector{.*3}" 134 PRINT#15,"u1 2 0 1 0":GET#2,c$,b$,m$:IFc$<>"c"ORb$<>"b"ORm$<>"m"THENPRINT"Boot sector was allocated for a program. Exiting{.*3}":DCLOSEu(z):END 135 FORi=1TO4:GET#2,n$:NEXT:PRINT"Old boot message: {142}";:DO:GET#2,a$:PRINTa$;:LOOPUNTILASC(a$)=0:PRINT"{ct n}" 136 BEND 140 PRINT"Please enter your boot message (it will be preceeded by BOOTING):" 141 INPUTbm$ 150 PRINT"Please enter the name of the program that you want to boot:" 151 INPUTfi$ 160 PRINT"Please select if you wish to: <1> RUN the program, or <2> BOOT it." 161 DO:GETKEYty$:LOOPUNTILINSTR("12",ty$)<>. 170 IFty$="1"THENBEGIN 171 fi$="run"+CHR$(34)+fi$+CHR$(34)+"onu(peek(186))" 172 BEND:ELSEBEGIN 173 fi$="boot"+CHR$(34)+fi$+CHR$(34)+"onu(peek(186))" 174 BEND 180 DO:PRINT"Are you sure that you want to write the boot sector?":GETKEYa$:LOOPUNTILINSTR("yn",a$)<>0 181 IFa$<>"y"THENDCLOSEu(z):PRINT"Program terminated{.*3}":END 190 PRINT#15,"b-p 2 0" 191 PRINT#2,"cbm"em$em$em$em$bm$em$em$; 192 FORi=1TO12:READa$:IFi=2THENPRINT#2,CHR$(15+LEN(bm$));:ELSEIFi=8THENPRINT#2,fi$;:ELSEPRINT#2,CHR$(DEC(a$)); 193 NEXT:DATAa2,,a0,0b,4c,a5,af,,00,0d,24,0d 194 PRINT#15,"u2 2 0 1 0":IFds>19THEN9999 200 PRINT"Disk succefully autobooted." 210 DCLOSEu(z):END 9999 PRINT"Disk error: "ds$:DCLOSE:END stop tok128 (bastext 1.0)