8-Bit Software Online Conversion
:2.$.LOADER - Listing
10*DIR $
20drive%=2
30ONERRORGOTO10
32REPEAT
40dir$="$"
50fn%=1
70REPEAT
80*FX4,1
90VDU3,14,12
100PROCcat
110REPEAT
120B=0
130PROCshow
140P%=0
150*FX21,0
160A=GET:IFA=33THENCHAIN"CONTROL"
170IFA>134 AND A<140 THENPROCjump
180IFA>47ANDA<52THENPROCdrive(A)
190IFA=66ORA=98THENPROCbackup
200IFA=67ORA=99THENPROCcopy
210IFA=77ORA=109THENPROCcompact
220IFA=82ORA=114THENPROCrun
230IFA=79ORA=111THENPROCopt4
240IFA=86ORA=118THENPROCview
250IFA=80ORA=112THENPROCview
260IFA=78ORA=110THENPROCname
270IFA=73ORA=105THENPROCinfo
280IFA=87ORA=119THENPROCwipe
290IFA=68ORA=100THENPROCdestroy
300IFA=84ORA=116THENPROCtitle
310IFA=76ORA=108THENPROClock
320IFA=85ORA=117THENPROCunlock
330IFA=36THENPROCdirectory
340IFA=42THENPROCoscommand
345IFA=63THENPROChelp
350UNTILB=1
360UNTILA=1
370UNTILFALSE
380
390DEFPROCshow
400PRINTTAB(0,4);
410F$="":add%=&0E00
420f%=0:c%=0:nf%=add%?261/8
430IF nf%=0 THEN PRINTCHR$(129);" E
MPTY DISC":ENDPROC
440REPEAT
450f%=f%+1:PROCprint
470IF f%=nf% THEN GOTO510
480f%=f%+1:PROCprint:PRINT
510UNTIL f%=nf%
520PRINT
530ENDPROC
540
550DEFPROCprint
560add%=add%+8
570c%=c%+1:PROCstring
590IF c%=fn% THEN F$=B$:PRINTCHR$(129)
;" <"; ELSE PRINTCHR$(131);" ";
600PRINTB$;
610IF c%=fn% THEN PRINT">"; ELSE PRINT
" ";
620IF add%?7 AND &80 THEN PRINT"L ";
ELSE PRINT" ";
630ENDPROC
640
650DEFPROCstring
660B$=""
670B$=B$+CHR$(add%?7 AND &7F)
680IFB$=dir$THENB$=" "ELSEB$=B$+"."
690FORN=0TO6:B$=B$+CHR$(?(add%+N)):NEX
T
720ENDPROC
722
730DEFPROCclr(line):IFline=24THENPRINT
TAB(0,24)STRING$(37," ");:ENDPROC
740PRINTTAB(0,line);STRING$(40," ");:E
NDPROC
750ENDPROC
760
770DEFPROCclear
780FOR W=20TO24:PROCclr(W):NEXT:ENDPRO
C
790
800DEFPROCclear1
810FOR W=4TO24:PROCclr(W):NEXT:ENDPROC
820
830DEFPROCjump
840IFA=138THENfn%=fn%+2
850IFA=139THENfn%=fn%-2
852IFA=136THENfn%=fn%-1
854IFA=137THENfn%=fn%+1
856IF A=135 THEN fn%=1
860IFfn%>nf%THENfn%=1
862IFfn%<1THENfn%=nf%
870ENDPROC
880
890DEFPROCdrive(D)
900drive%=D-48
910OSCLI("DIR :"+STR$(drive%)+".$")
920A=1:B=1
930ENDPROC
940
950DEFPROCbackup
960PROCclear:PRINTTAB(0,20)" BACKUP ";
STR$(drive%);" to drive ... ";
970D=GET:PRINTCHR$(D):IFD<48ORD>51THEN
GOTO960
980PRINT" Press any key to start..":A=
GET
990OSCLI("ENABLE")
1000OSCLI("BACKUP "+STR$(drive%)+" "+CH
R$(D))
1010ENDPROC
1020
1030DEFPROCdestroy
1040VDU15
1050PROCclear:PRINTTAB(0,20)
1060INPUT" DESTROY <afsp> "W$
1070IF W$="" THEN W$=F$
1080OSCLI("ENABLE")
1090OSCLI("DESTROY "+W$)
1100A=1:B=1:ENDPROC
1110
1120DEFPROCwipe
1130VDU15
1140PROCclear:PRINTTAB(0,20)
1150INPUT" WIPE <afsp> "W$
1160IF W$="" THEN W$=F$
1170OSCLI("WIPE "+W$)
1180A=1:B=1:ENDPROC
1190
1200DEFPROCcopy
1210VDU15
1220PROCclear:PRINTTAB(0,20)
1230INPUT" COPY <afsp> "W$
1240IF W$="" THEN W$=F$
1250PRINTTAB(0,21)" COPY ";W$;" to driv
e ... ";:D=GET
1260source=drive%:PROCdrive(D)
1270PRINTTAB(0,22);
1280OSCLI("COPY "+STR$(source)+" "+STR$
(drive%)+" "+W$)
1290ENDPROC
1300
1310DEFPROCopt4
1320PROCclear:PRINTTAB(0,20)" OPT4,"
1330C=GET:IF C=13THENENDPROC
1340IFC<48ORC>51THEN1320
1350OSCLI("OPT4,"+STR$(C))
1360A=1:B=1:ENDPROC
1370
1380DEFPROCtitle
1400PROCclear
1420PRINTTAB(0,20)" The present title i
s ";T$
1430PRINTTAB(0,22);:INPUT" ENTER the ne
w title... "T$
1440IFT$<>""THENOSCLI("TITLE "+T$)
1450B=1:ENDPROC
1460
1470DEFPROClock
1480IFA=76THENF$="*.*"
1490OSCLI("ACCESS "+F$+" L")
1500B=1:ENDPROC
1510
1520DEFPROCunlock
1530IFA=85THENF$="*.*"
1540OSCLI("ACCESS "+F$)
1550B=1:ENDPROC
1560
1570DEFPROCview
1580PROCgetinfo
1590CLS:PROCcheck`printer
1600IFL%=&1900ANDE%=&1904THENPROCasci`f
ile:GOTO1630
1610IFL%=&0000ORL%=&FFFFTHENPROCasci`fi
le:GOTO1630
1620IFE%>&8000 THEN PROCcheckbasic ELSE
VDU14:OSCLI("DUMP "+F$)
1630CLOSE#0:VDU3
1640PRINT''" END OF FILE"
1650PROCend:B=1:ENDPROC
1660
1670DEFPROCasci`file
1680ch=OPENIN(F$)
1690REPEAT
1700A%=BGET#ch
1710IFA%>31THENVDUA%
1720IFA%=13THENPRINT
1730IFA%=27THENA%=BGET#ch:VDU1,27,1,A%
1740PROCcheck`keyboard
1750UNTILEOF#(ch) OR K=13
1760ENDPROC
1770
1780DEFPROCcheck`keyboard
1790K=INKEY(1):IFK=32THENPROChold
1800*FX21,0
1810ENDPROC
1820
1830DEFPROChold
1840v%=VPOS:h%=POS:PRINTTAB(0,24):PROCe
nd
1850IFK=13THENENDPROC
1860v%=v%-1
1870PRINTTAB(0,24)"
":IFv%=24THENv%=23
1880PRINTTAB(h%,v%-1);:ENDPROC
1890
1900DEFPROCcheck`printer
1910CLS:VDU15:z%=0:IFA<>80ANDA<>112THEN
ENDPROC
1920PRINTTAB(8,10)" CHECK PRINTER IS RE
ADY"'" AND HIT ANY KEY":G=GET
1930P%=1:CLS:VDU2:ENDPROC
1940
1950DEFPROCname
1960PROCclear:PRINTTAB(0,20)" Rename ";
F$;:INPUT" as ... "N$:IFN$=""THENB=1:END
PROC
1970OSCLI("RENAME "+F$+" "+N$)
1980A=1:B=1:ENDPROC
1990
2000DEFPROCinfo
2010VDU15
2020IFA=73THENCLS:PRINT" INFORMATION fo
r drive ";drive%;':OSCLI("INFO *.*")
2030IFA=105THENPROCclear:PRINTTAB(0,20)
;:OSCLI("INFO "+F$)
2040VDU14:PROCend:ENDPROC
2050
2060DEFPROCdirectory
2070PROCclear:PRINTTAB(0,20)" ENTER the
new directory...";:dir$=GET$:PRINTdir$
2080OSCLI("DIR "+dir$)
2100B=1:ENDPROC
2110
2120DEFPROCrun
2130VDU15:*FX4,0
2140PROCgetinfo
2150IFL%=&0000ORL%=&FFFFTHENPRINT'" TEX
T FILE":GOTO2040
2155CLS
2160IFE%>&8000THENPAGE=O%:CHAINF$
2170OSCLI("RUN "+F$)
2180ENDPROC
2190
2200DEFPROCcompact
2210PROCclear:PRINTTAB(0,20)
2220VDU15
2230C$="COMPACT "+STR$(drive%)
2240OSCLI(C$)
2250PROCend:ENDPROC
2260
2270DEFPROCoscommand
2280PROCclear:PRINTTAB(0,20)
2290VDU15
2300INPUT" *"C$
2310IFC$=""THENENDPROC
2320OSCLI(C$)
2330A=1:PROCend:ENDPROC
2340
2350DEFPROCend
2360PRINT" Hit any key to continue ..."
;:K=GET:B=1:ENDPROC
2370
2380DEFPROCviewbasic
2390S%=0:R%=0
2400ch=OPENIN(F$)
2410
2420REPEAT
2430A%=BGET#ch
2440IFA%=141THENPROCgoto
2450IFS%ORR%THENVDUA%ELSECALL&B50E
2460IFA%=34THENS%=S%EOR1
2470IFA%=244THENR%=1
2480IFA%=13THENPROCnewline
2490IFA%=58THENS%=0:R%=0
2500PROCcheck`keyboard
2510UNTILEOF#(ch)ORK=13
2520ENDPROC
2530
2540DEFPROCnewline
2550S%=0:R%=0
2560H%=BGET#ch:IFEOF#(ch)THENENDPROC
2570L%=BGET#ch:IFEOF#(ch)THENENDPROC
2580N%=BGET#ch:IFEOF#(ch)THENENDPROC
2590IFP%THENVDU3,10,2:ELSEVDU10
2600L$=STR$(H%*&100+L%)
2610REPEAT:L$=" "+L$:UNTIL LEN(L$)=6
2620PRINTL$;
2630A%=0
2640ENDPROC
2650
2660DEFPROCgoto
2670H%=BGET#ch:L%=BGET#ch:N%=BGET#ch
2680H%=H%*4AND&FF
2690T%=H% AND &C0 EOR L%
2700H%=H%*4AND&FF EOR N%
2710L$=STR$(H%*&100+T%)
2720GOTO 2620
2730
2740DEFPROCcat
2750PROCdircmd
2752IF?&7A<>0THENPRINT"DISC FAULT ";?&7
A
2760add%=&0E00:T$=""
2770FORN=0TO7:T$=T$+CHR$(add%?N):NEXT
2780FORN=256TO259:T$=T$+CHR$(add%?N):NE
XT
2790PRINTT$;" (";÷add%?260;")"
2800o%=add%?262 DIV &10
2810PRINTTAB(20,0)"Option ";o%;" (";MID
$(" off)LOAD) RUN)EXEC)",o%*5+1,5)
2820PRINT"Drive ";drive%;"
";MID$("4080",add%?262 AND &03,2);" Trac
ks"
2830PRINT"Directory :";drive%;".";dir$;
" ";add%?261/8;" Files"
2840PRINTTAB(0,20)" ENTER ! for CONTROL
MENU,drive number,"
2850PRINTTAB(0,21)" Upper case key to..
..Backup coMpact"
2860PRINTTAB(0,22)" Copy Destroy Info
. Lock Name Opt4"
2870PRINTTAB(0,23)" Print Run Titl
e Unlock View Wipe"
2880ENDPROC
2890
2900DEFPROCgetinfo
2920D%=!(&0F00+fn%*8)
2930L%=D%AND&FFFF:E%=(D% DIV &10000) AN
D&FFFF
2940ENDPROC
2950
2960DEFPROCdircmd
2970?&70=drive%
2980?&71=0
2990?&72=&0E
3000?&73=0
3010?&74=0
3020?&75=3
3030?&76=&53
3040?&77=0:REM TRACK
3050?&78=0:REM SECTOR
3060?&79=&22:REM 2 SECTORS
3080A%=&7F:X%=&70:Y%=0:R%=USR(&FFF1)
3090ENDPROC
3100
3110DEFPROCcheckbasic
3120IF?&8008=1THENPROCviewbasic:ENDPROC
3130PRINT"Sorry BASIC 2 only."
3140PRINT"Unless you know and alter the
"
3150PRINT"call address in PROCviewbasic
"
3160PRINT"and the check byte in PROCche
ckbasic."
3165B=1
3170PROCend:ENDPROC
3200DEFPROChelp
3205CLS:PRINT
3210PRINT"****** Help for the file load
er ******"
3212PRINT"esc..Return to the loader men
u"
3214PRINT"!..Return to the control menu
"
3216PRINT"*..Enter os command"
3218PRINT"O..Change boot up option 1-3"
3220PRINT"N..Rename current or named fi
le"
3222PRINT"R..Run current file"
3224PRINT"T..Retitle disk"
3226PRINT"*****************************
*********"
3228PRINT"l/L..Lock : This group ope
rate on"
3230PRINT"u/U..Unlock : the current fi
le or"
3232PRINT"i/I..Info : all files"
3234PRINT"*****************************
*********"
3236PRINT"C..Copy : This group ope
rate on"
3238PRINT"D..Destroy : the current fi
le or"
3240PRINT"W..Wipe : <filespec>"
3242PRINT"*****************************
*********"
3244PRINT"P..Print : Unpredictable
results"
3246PRINT"V..View : alter to suit.
"
3248PRINT"*****************************
*********"
3250PRINT"B..Backup : These write ov
er this"
3252PRINT"M..coMpact : program so mus
t reboot"
3254PRINT"*****************************
*********"
3290A=GET:B=1:ENDPROC