10REM >DirctC2
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%=1
460choice`made%=FALSE
470REPEAT
480REPEAT
490*FX21
500key$=CHR$(GET AND &DF)
510UNTIL (key$>="A" AND key$<="F") OR
(key$=CHR$(13) AND choice`made%)
520IF key$<>CHR$(13) THEN choice`made%
=TRUE:PRINTTAB(choice`x%,choice`y%);key$
;TAB(0,5+choice%);CHR$137;:choice%=ASC(k
ey$)-64:PRINTTAB(0,5+choice%);CHR$136;
530UNTIL key$=CHR$(13)
540=choice%
550:
560DEF PROCtitle
570REM Display the program title at th
e top of the screen
580VDU 26,12
590PRINTTAB(7,0);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu Demonstration ";CHR$15
6
600PRINTTAB(7,1);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu Demonstration ";CHR$15
6
610PRINTTAB(7,2);CHR$131;"(C) Steven F
lintham 1993"
620ENDPROC