8-Bit Software Online Conversion
8BS Menu Reader - Listing
10REM > MenRead 1.21
20REM v1.20 19-06-96 JGH: Modified fo
r new menus
30REM v1.21 23-11-96 JGH: Output to f
ile added
40:
50DEFFNS="MenRead"
60MODE7
70Uon$=CHR$1+CHR$27+CHR$1+CHR$45+CHR$
1+CHR$1
80Uoff$=CHR$1+CHR$27+CHR$1+CHR$45+CHR
$1+CHR$0
90REPEAT
100MODE7:VDU23;8202;0;0;0;23;2,53;0;0;
0;0;0;
110PRINT'''TAB(4)"
120PRINTTAB(4)"
130PRINT'''" Printout of menu from iss
ue 28 onwards."
140PRINT" Including new menu from is
sue 50"
150PRINT'''TAB(8)" Printer on? Y/N
"
160REPEAT:A$=GET$:UNTILINSTR("YyNn",A$
)
170IF INSTR("Yy",A$):P%=2 ELSE P%=14
180in%=0:out%=0:A%=0:E%=0:Y%=0:fs%=(US
R&FFDA)AND&FF
190IFfs%=4:OSCLI"DRIVE 0" ELSE OSCLI"M
OUNT 0"
200PRINT'TAB(6)" Output to file? Y/N
"
210REPEAT:A$=GET$:UNTILINSTR("YyNn",A$
)
220IF INSTR("Yy",A$):INPUT'TAB(6)" Out
put filename: "F$:out%=OPENOUT(F$):P%=0
230MODE&80:ONERROR:REPORT:PROCClose:PR
INT:END
240T%=0:in%=OPENIN"Menu":IFin%=0:T%=1:
in%=OPENIN"!Boot":PTR#in%=EXT#in%DIV2
250Issue$=FNissue:Date$=FNdate
260VDUP%:IF P%=14 PRINT"Press SHIFT to
scroll text."
270A%=FNfx(199,out%):PRINTTAB(8);:IFP%
=2:PRINTUon$;
280PRINT "8-Bit Software Issue ";Issue
$;" (";Date$;") ";MID$("HA",3-fs%DIV8);"
DFS Version";FNcr;:IFP%=2:PRINTUoff$;
290PRINTTAB(5);:IFP%=2:PRINTUon$;
300PRINT"Program description.
Type. Program name."FNcr;
310IFP%=2:PRINTUoff$;
320IFT%=0:PTR#in%=&1300
330REPEAT:PROCmenu:REPEATUNTILBGET#in%
=&D OR EOF#in%
340UNTILEOF#in%:CLOSE#in%:in%=0:IFP%=2
:VDU3
350IFout%:CLOSE#out%:out%=0:A%=FNfx(19
9,0)
360PRINT'''"Insert next disk and press
a key, or Escape to end";:IFGET
370UNTILFALSE:END
380:
390DEFPROCmenu:REPEATUNTILBGET#in%=&DC
OREOF#in%:REM Find DATA statement
400IFEOF#in%:ENDPROC
410MenTit$=FNgt:Num%=VALFNgt:IFP%=2:PR
INTUon$;
420PRINTFNcr;MenTit$;FNcr;:IFP%=2:PRIN
TUoff$;
430FORL%=1TO Num%:PTR#in%=PTR#in%+5:RE
M Move to next line
440Desc$=FNgt:IFT%=0:Act$=FNgt
450Dir$=FNgt:Name$=FNgt:Asc$=FNgt:IFT%
=0:Ttx$=FNgt:Opt%=VALFNgt
460IFDir$<>"":Dir$=Dir$+"."
470IFT%=0:Opt%=VALAsc$+VALTtx$
480IFT%=1:Opt%=VALAsc$:IFOpt%=0:Opt%=-
1-INSTR("MODE3TEXT MODE7TTXT ARCHIARCHIC
HAINBASICLOAD LOAD LIST LIST ",LEFT$(Asc
$,5))DIV10
490IFOpt%>0:NEXT:ENDPROC
500PRINTTAB(5)CHR$(L%+64);": ";Desc$;T
AB(38);MID$("Prog Text Ttxt Arch BasicBa
sicBasic",1-5*Opt%,5);
510PRINTTAB(45);Dir$;Name$;FNcr;
520NEXT:ENDPROC
530:
540DEFFNgt:A$="":REPEATA%=BGET#in%
550IFA%<>&2C AND A%<>&D AND A%>31 AND
A%<127:A$=A$+CHR$A%
560UNTILA%=&2C OR A%=&D:IFLEFT$(A$,1)=
" ":REPEATA$=MID$(A$,2):UNTILLEFT$(A$,1)
<>" "
570=LEFT$(A$,LENA$+(RIGHT$(A$,1)="""")
)
580DEFFNissue:L%=0:REPEAT:IFBGET#in%=&
6C:IFBGET#in%=&24:IFBGET#in%=&3D:IFBGET#
in%=&22:L%=TRUE
590UNTILL% OR T%>0:IFT%=1:REPEATREPEAT
UNTILBGET#in%=&D:PTR#in%=PTR#in%+3:UNTIL
BGET#in%=&DC
600=FNgt
610DEFFNdate:L%=0:REPEAT:IFBGET#in%=&6
D:IFBGET#in%=&24:IFBGET#in%=&3D:IFBGET#i
n%=&22:L%=TRUE
620UNTILL% OR T%>0:IFT%=1:PTR#in%=PTR#
in%-1
630DEFFNcr:PRINTCHR$13;:A%=FNfx(199,0)
:PRINT:A%=FNfx(199,out%):=""
640=FNgt
650DEFFNfx(A%,X%):LOCALY%:Y%=X%DIV256:
=((USR&FFF4)AND&FFFF00)DIV256
660DEFPROCClose:IFout%:A%=out%:out%=0:
CLOSE#A%
670IFin%:A%=in%:in%=0:CLOSE#A%
680ENDPROC