8-Bit Software Online Conversion

Program presentation example1 - Listing

10REM >DirctC1 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 key$ 340PROCtitle 350PRINTTAB(15,4);"Main Menu" 360PRINTTAB(0,6);CHR$131;"A";CHR$135;" Menu option 1" 370PRINTTAB(0,7);CHR$131;"B";CHR$135;" Menu option 2" 380PRINTTAB(0,8);CHR$131;"C";CHR$135;" Menu option 3" 390PRINTTAB(0,9);CHR$131;"D";CHR$135;" Menu option 4" 400PRINTTAB(0,10);CHR$131;"E";CHR$135; "Menu option 5" 410PRINTTAB(0,11);CHR$131;"F";CHR$135; "Quit this program" 420PRINT'"Your choice?";CHR$131; 430REPEAT 440*FX21 450key$=CHR$(GET AND &DF) 460UNTIL key$>="A" AND key$<="F" 470PRINT key$ 480=ASC(key$)-64 490: 500DEF PROCtitle 510REM Display the program title at th e top of the screen 520VDU 26,12 530PRINTTAB(7,0);CHR$141;CHR$132;CHR$1 57;CHR$131;"Menu Demonstration ";CHR$15 6 540PRINTTAB(7,1);CHR$141;CHR$132;CHR$1 57;CHR$131;"Menu Demonstration ";CHR$15 6 550PRINTTAB(7,2);CHR$131;"(C) Steven F lintham 1993" 560ENDPROC