Classic Computer Magazine Archive ANTIC VOL. 5, NO. 9 / JANUARY 1987


Menu Maestro

Impressive menu-maker for your programs

Plug elaborate menu screens into your own programs with ease. Menu Scroller is a short BASIC utility that works on all Atari 8-bit computers of any memory size, with disk or cassette.

Menu Maestro screenThe BASIC programs you write will look a lot more professional with these impressive menu selection screens in five vivid colors. A horizontal prompt banner scrolls smoothly across the bottom of each screen. You can choose from as many as nine selections by pressing the appropriate number key and there's no waiting.

Intermediate BASIC programmers can use Menu Scroller as the core program for applications such as school grades, or for users group monthly disk inventories. Just add the logic of the various subroutines and RETURNs to the main menu to complete your customized program. If you rename the program to MENU, you can use the AUTORUN.SYS file on the Antic monthly disk to automatically RUN Menu Scroller at boot time.

Type in Listing 1, MENU.BAS, check it with TYPO II and SAVE a copy before you RUN it.

If you have trouble typing the special characters in lines 352-356, Listing 2 will create these lines for you and write them to a disk file called MLINES.LST. Type in Listing 2, check it with TYPO II and SAVE a copy before you RUN it. Now LOAD the main program, MENU.BAS, and ENTER the file MLINES.LST. Remember to SAVE completed program before you RUN it.


Line 140 calls the subroutine at line 350, establishing the two machine language routines which create the fancy display and the scrolling prompt. Line 360 identifies P$, which is only used in the skeleton program to show which line is reached. Feel free to change P$ when using the menu with your own programs. Line 160 sets the five colors for the menu with the appropriate registers.

Lines 170-230 are the main loop of the menu. The item numbers are positioned a little to the left, so there is room for a longer selection to replace the item numbers. The subroutine calls in lines 180 set up the scroll for the prompt string (ME$ in line 370). The entire string scrolls from right to left at the bottom of the screen between two horizonal bars. In line 230, the "20" in the USR call is the scroll speed. Lower numbers give faster speeds. The number preceding the scroll speed is the location of the scrolling line.

Line 230 decodes your selection and branches to the appropriate routine. Line 330 selects the random color for the accent bars on the menu. To see the color variations, just keep pressing number selections.

The changes to the display list are persistent, so the background of the main menu can be used with subroutine title screens and appropriate color changes to produce distinctive subroutine menus. If you do this, a wide variety of other prompts such as formatting or accessing a disk directory can be placed on the screen instead of the INPUT statements as illustrated in the main menu.

Earl Hill lives in Erie, Pennsylvania. This is his first publication in Antic.

Listing 1: MENU.BAS Download

Listing 2: LINES.BAS(not needed)