8-Bit Software Online Conversion
Presenting progs Ex. 1 - Listing
10REM >SD1
20REM by Steven Flintham
30REM
40REM Saturday 8th May 1993
50:
60MODE 7
70VDU 23;8202;0;0;0;
80PROCdisable
90PROCinit
100REPEAT
110choice%=FNmenu
120UNTIL choice%=6
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";TAB(35,4);
"1"
350PRINTTAB(3,5);"Option 2";TAB(35,5);
"2"
360PRINTTAB(3,6);"Option 3"
370PRINTTAB(3,7);"Option 4";TAB(35,7);
"4"
380PRINTTAB(3,8);"Option 5"
390PRINTTAB(3,9);"Quit this program";T
AB(35,9);"Q"
400PRINTTAB(0,11);"Use the cursor keys
to move the bar and"'"press RETURN to s
elect, or use the"'"appropriate key shor
tcut"
410choice%=1
420PRINTTAB(0,choice%+3);CHR$132;CHR$1
57;CHR$131;TAB(38,choice%+3);CHR$156;
430REPEAT
440REPEAT
450*FX21
460key%=GET
470UNTIL INSTR("124Qq"+CHR$(138)+CHR$(
139)+CHR$(13),CHR$(key%))>0
480PRINTTAB(0,choice%+3);" "
490IF key%=138 THEN IF choice%<6 THEN
choice%=choice%+1
500IF key%=139 THEN IF choice%>1 THEN
choice%=choice%-1
510IF key%>=ASC("a") AND key%<=ASC("z"
) THEN key%=key%-32
520IF key%=ASC("1") THEN choice%=1
530IF key%=ASC("2") THEN choice%=2
540IF key%=ASC("4") THEN choice%=4
550IF key%=ASC("Q") THEN choice%=6
560PRINTTAB(0,choice%+3);CHR$132;CHR$1
57;CHR$131;TAB(38,choice%+3);CHR$156;
570UNTIL key%=13
580=choice%
590:
600DEF PROCtitle
610VDU 26,12
620PRINTTAB(7,0);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu demonstration ";CHR$15
6
630PRINTTAB(7,1);CHR$141;CHR$132;CHR$1
57;CHR$131;"Menu demonstration ";CHR$15
6
640PRINTTAB(7,2);CHR$131;"(C) Steven F
lintham 1993"
650ENDPROC