GS 5: Building the MENU File

Go to Page 4  Go to Page 6

OVERVIEW

Our goal here is to build a small program (<2KB) that can demo a boot menu on the SBC30.

As discussed in the four pages prior we'll need:

 - a loader file with all of the included file names. To keep things simple though, we'll skip that for now and just build a single file with everything included

- device addresses

- variables & their addresses if needed

- a ROM starting address; we'll use $8000

- to initialize the devices. For simplicity's sake, we'll only include the ACIA UART to communicate with our PC

- indexes to the variables so we can preload them for "indexed addressing with Y"

- the main program that is essentially a brief selection menu. In the adjacent screenshot, you can see the two menu selections, 1 and 2, at the top

- a Prompt so the user is not staring at "dead space" after a menu selection runs

- an app/utility to read the keyboard input at the prompt and ensure the typed characters are valid hex (0 to 9, A to F, a to f)

- a launcher for each app. In our example the first app is called App2 and the second, App4

- the two apps themselves. Each requires several utility programs to help them run. They will be called with JSR (jump sub routine) commands

- the utility programs that will perform character spacing or newlines, character checking, conversion from hexadecimal to ASCII and vice versa, etc.

- messages like the ones you are reading in the adjacent screenshot

- and lastly a vector list for the microprocessor so it knows how to handle a reset or interrupts

 

MENUS

Essentially there are 5 components to a menu:

- a title. It's shown in blue highlighted text in the adjacent screenshot

- a list of menu items to be displayed. You can see two adjacent at the top: the first is shown with yellow highlight and the second with orangey-red highlight

- a linked list of menu item choice numbers/letters to be displayed

- a branch or jump to the chosen application

- a user prompt to avoid "dead space". It's shown in green highlight

 

We will build a short menu with 2 menu choices.

For the menu item, we'll use a message we'll display on the user's terminal screen. For applications we'll use some math examples.

 

On the next page you'll see the assembly code for the menu.

 

Our SBC30 Boot Menu

 

 

 

    

 

 

 

 

Go to Page 4  Go to Page 6

 

Updated 2024-01-15

 

HOME