8-Bit Software Online Conversion
Menu Reader - Listing
10DEFFNS="MenRead"
20A%=0:Y%=0:SYS%=USR&FFDA MOD &100
30REPEAT
40MODE7
50VDU23;8202;0;0;0;
60PRINT'''TAB(4)"
70PRINTTAB(4)"
80PRINT'''" Printout of menu from iss
ue 28 onwards."
90PRINT'''TAB(8)" Printer on? Y/N
"
100REPEAT
110A$=GET$
120UNTILINSTR("YyNn",A$)
130IF INSTR("Yy",A$) P%=2 ELSE P%=14
140MODE0
150IF P%=14 PRINT"Press SHIFT to scrol
l text."
160IF SYS%=8:*ADFS
170IF SYS%=4:OSCLI"DR.0"
180*DIR $
190F%=OPENIN"Menu"
200L%=0
210REPEAT
220A%=BGET#F%:IF A%=&6C IF BGET#F%=&24
IF BGET#F%=&3D IF BGET#F%=&22:L%=1
230UNTILL%=1
240Issue$=FNgt
250Issue$=LEFT$(Issue$,LENIssue$-1)
260L%=0
270REPEAT
280A%=BGET#F%:IF A%=&6D IF BGET#F%=&24
IF BGET#F%=&3D IF BGET#F%=&22:L%=1
290UNTILL%=1
300Date$=FNgt
310Date$=LEFT$(Date$,LENDate$-1)
320VDUP%
330VDU1,27,1,45,1,1:REM UNDERLINE ON
340PRINT "8-Bit Software Issue ";Issue
$;" (";Date$;") ";:IF SYS%=4 PRINT"DFS V
ersion"' ELSE PRINT "ADFS Version"'
350VDU1,27,1,45,1,0:REM UNDERLINE OFF
360PRINTTAB(5);
370VDU1,27,1,45,1,1:REM UNDERLINE ON
380PRINT"Program description. (T)elete
xt (A)SCII (P)rogram. Program name."
390VDU1,27,1,45,1,0:REM UNDERLINE OFF
400PTR#F%=&1300
410REPEAT
420A%=BGET#F%
430UNTIL A%=&DC:REM FIND FIRST DATA ST
ATEMENT
440REPEAT:REM OUTER MENU LOOP
450MenTit$=FNgt
460MenTit$=MID$(MenTit$,INSTR(MenTit$,
" ")+1)
470Head$=FNgt:REM HEADINGS IN MENU
480Q%=VAL Head$
490PROCreadmenu
500REPEATUNTILBGET#F%=&D OR EOF#F%
510IF PTR#F%<>EXT#F%:PTR#F%=PTR#F%+3
520UNTIL EOF#F%
530CLOSE#F%
540VDU3
550PRINT'''"INSERT NEXT DISC AND PRESS
A KEY"
560REPEATUNTILGET
570UNTILFALSE
580DEFPROCreadmenu
590VDU1,27,1,45,1,1:REM UNDERLINE ON
600PRINT'MenTit$
610VDU1,27,1,45,1,0:REM UNDERLINE OFF
620FORL%=1TOQ%
630PTR#F%=PTR#F%+5
640Desc$=FNgt
650A$=FNgt
660Name$=FNgt
670IF Name$<>"" Name$=Name$+"."
680Name$=Name$+FNgt
690Ascii$=FNgt
700Ttext$=FNgt
710Menu$=FNgt
720IF Menu$<>"0" NEXT:ENDPROC
730PRINT TAB(5)CHR$(L%+64);".";Desc$;
740PRINT TAB(38);
750IF Ascii$="0" IF Ttext$="0" PRINT"P
";
760IF Ascii$="-1" IF Ttext$="0" PRINT"
A";
770IF Ttext$="-1" IF Ttext$="-1" PRINT
"T";
775PRINTTAB(41);Name$
780NEXT
790ENDPROC
800DEFFNgt
810Temp$=""
820REPEAT
830A%=BGET#F%
840IFA%<>&2C IF A%<>&D IFA%>31 IF A%<1
27 Temp$=Temp$+CHR$A%
850UNTILA%=&2C OR A%=&D
860=Temp$