8-Bit Software Online Conversion
Presenting programs Ex. 2 - Listing
10REM >Step2
20REM by Steven Flintham
30REM
40REM Wednesday 4th March 1993
50:
60MODE 7
70VDU 23;8202;0;0;0;
80PROCdisable
90PROCinit
100REPEAT
110choice%=FNmenu
120UNTIL choice%=5
130MODE 7
140PROCenable
150END
160:
170DEF PROCdisable
180*FX229,1
190*FX4,1
200ENDPROC
210:
220DEF PROCenable
230*FX229
240*FX4
250ENDPROC
260:
270DEF PROCinit
280ON ERROR MODE 7:REPORT:PRINT " at l
ine ";ERL:PROCenable:END
290ENDPROC
300:
310DEF FNmenu
320LOCAL choice%,key%
330PROCtitle
340PRINTTAB(3,4);"Option 1"
350PRINTTAB(3,5);"Option 2"
360PRINTTAB(3,6);"Option 3"
370PRINTTAB(3,7);"Option 4"
380PRINTTAB(3,8);"Option 5"
390PRINTTAB(3,9);"Quit this program"
400PRINTTAB(0,11);"Use the cursor keys
to move the bar and"'"press RETURN to s
elect"
410choice%=0
420PRINTTAB(0,choice%+4);CHR$132;CHR$1
57;CHR$131;TAB(38,choice%+4);CHR$156;
430REPEAT
440*FX21
450key%=GET
460PRINTTAB(0,choice%+4);" "
470IF key%=138 THEN IF choice%<5 THEN
choice%=choice%+1
480IF key%=139 THEN IF choice%>0 THEN
choice%=choice%-1
490PRINTTAB(0,choice%+4);CHR$132;CHR$1
57;CHR$131;TAB(38,choice%+4);CHR$156;
500UNTIL key%=13
510=choice%
520:
530DEF PROCtitle
540VDU 26,12
550PRINTTAB(7,0);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu demonstration ";CHR$15
6
560PRINTTAB(7,1);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu demonstration ";CHR$15
6
570PRINTTAB(7,2);CHR$131;"(C) Steven F
lintham 1993"
580ENDPROC