Classic Computer Magazine Archive COMPUTE! ISSUE 89 / OCTOBER 1987 / PAGE 83

Atari ST Menu Driver

Brian Flynn

Are your BASIC programs cluttering up your disks, hiding in folders, and straying beyond your file-window's view? If clicking scroll bars in an attempt to locate that elusive BASIC program is getting tiresome, try "Atari ST Menu Driver." This short program provides easy menu-driven access to all your ST BASIC programs.

"Atari ST Menu Driver" makes loading and running ST BASIC programs a lot easier. Extracted from the disk accompanying the COMPUTE! book ST Applications, written by Brian and John Flynn, the menu driver handles up to ten programs and works with either a monochrome monitor set to high resolution or a color monitor set to medium resolution.

Atari ST Menu Driver was written in modular style for ease of comprehension. Subroutines are identified by labels, such as SET-SCREEN:, DRAW.MENU:, and the like. This feature of ST BASIC is very handy, and you may want to use it in some of your own projects.

This program also takes advantage of the ST's VDI (Virtual Device Interface) routines. These high-powered PEEK and POKE procedures enable the use of such tasks as reading the location of the mouse pointer, drawing boxes and octagons, and writing text to the screen. Each VDI routine is clearly labeled and is highly transportable to other programs.

Getting Started

As noted, Menu Driver can be used with either a monochrome or a color monitor. If you are using a color monitor, set the screen resolution to medium. Choose Set Preferences from the Options pull-down menu on the GEM desktop. You will be offered two choices: Low Resolution and Medium Resolution. Select the latter. Then load ST BASIC as usual.

If you are using a monochrome monitor, don't worry about screen resolution. It's automatically set to high, and it cannot be changed.

Now, type in and save the program.

Using The Program

By way of example, the program is currently set up to run ten BASIC programs found in the chapter on games in ST Applications. Upon running the menu driver, a list of program names appears, beginning with "Enigma" and ending with "Bunny's Tic-Tac-Toe." Assuming your disk contained these programs, all you would need to do is click the mouse to load and run a program.

To modify the driver to accommodate other sets of programs, follow these simple steps:

  1. Choose a title for your group of programs, and place it in line 360. The program will automatically center your entry.
  2. Indicate in line 670 the number of programs in your group. Up to ten programs are allowed.
  3. At the end of the driver (lines 1850–onward), enter two names for each program:
  • the full program title to be displayed on the screen.
  • the actual filename, with BAS included.

Finally, save your menu-driver with a suitable name like GAMES-BAS for games, or perhaps MONEY.BAS for a group of financial applications. For convenience, the menu driver should be saved on the same disk as the ST BASIC programs that it is set up to load.

If you follow the example set by the game programs already entered, you should have no problem customizing Atari ST Menu Driver for your own purposes. In fact, you may want to create a menu-driver for each category of BASIC programs that you have occasion to access.