10REM >DirctC3
20REM by Steven Flintham
30REM
40REM Sunday 10th January 1992
50:
60MODE 7
70VDU 23;8202;0;0;0;
80PROCdisable
90PROCinit
100REPEAT
110choice%=FNmain`menu
120UNTIL choice%=6
130MODE 7
140PROCenable
150END
160:
170DEF PROCdisable
180*FX229,1
190*FX4,2
200ENDPROC
210:
220DEF PROCenable
230*FX229,0
240*FX4,0
250ENDPROC
260:
270DEF PROCinit
280ON ERROR MODE 7:REPORT:PRINT " at l
ine ";ERL:PROCenable:END
290ENDPROC
300:
310DEF FNmain`menu
320REM Display the main menu and accep
t the user's input
330LOCAL choice`x%,choice`y%,choice%,c
hoice`made%,key$
340PROCtitle
350PRINTTAB(15,4);"Main Menu"
360PRINTTAB(1,6);CHR$131;"A";CHR$135;"
Menu option 1"
370PRINTTAB(1,7);CHR$131;"B";CHR$135;"
Menu option 2"
380PRINTTAB(1,8);CHR$131;"C";CHR$135;"
Menu option 3"
390PRINTTAB(1,9);CHR$131;"D";CHR$135;"
Menu option 4"
400PRINTTAB(1,10);CHR$131;"E";CHR$135;
"Menu option 5"
410PRINTTAB(1,11);CHR$131;"F";CHR$135;
"Quit this program"
420PRINT'"Your choice?";CHR$131;
430choice`x%=POS:choice`y%=VPOS
440PRINT'"(Press RETURN to confirm you
r choice)"
450choice%=3
460PRINTTAB(choice`x%,choice`y%);CHR$(
64+choice%)
470PRINTTAB(0,5+choice%);CHR$136;
480REPEAT
490REPEAT
500*FX21
510key$=CHR$(GET AND &DF)
520UNTIL (key$>="A" AND key$<="F") OR
key$=CHR$(13)
530IF key$<>CHR$(13) THEN PRINTTAB(cho
ice`x%,choice`y%);key$;TAB(0,5+choice%);
CHR$137;:choice%=ASC(key$)-64:PRINTTAB(0
,5+choice%);CHR$136;
540UNTIL key$=CHR$(13)
550=choice%
560:
570DEF PROCtitle
580REM Display the program title at th
e top of the screen
590VDU 26,12
600PRINTTAB(7,0);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu Demonstration ";CHR$15
6
610PRINTTAB(7,1);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu Demonstration ";CHR$15
6
620PRINTTAB(7,2);CHR$131;"(C) Steven F
lintham 1993"
630ENDPROC