60 PRINT “ F1 - Quit Launchpad”
70 PRINT “ F2 - Screen Colors”
80 PRINT “ F3 - Keyboard Numbers”
180 REM - Add F4 - F12 Menu Item Print
190 PRINT “ “: PRINT “ >>> Press Function Key to
200 REM —- Get Keyboard Input —-
220 IF k<208 OR k>219 THEN GOTO 210
230 REM —- RUN Selected App —-
240 GOTO 250 + (k-208)
250 CLS: END REM - F1
251 RUN “COLORS.BAS” REM - F2
252 RUN “KEYNUM.BAS” REM - F3
253 REM - F4
254 REM - F5
255 REM - F6
256 REM - F7
257 REM - F8
258 REM - F9
259 REM - F10
260 REM - F11
261 REM - F12
270 GOTO 210
• Line 252 loads and runs KEYNUM.BAS. Again, we’ll
need to make a minor change to KEYNUM.BAS to get it
to restart the Launchpad.
• Lines 253-261 are stubs where you can insert
additional RUN commands for keys F4-F12 to launch
other programs. Add them in order, starting with F4.
• Line 270 sends program flow back to get another
keystroke in case an undefined function key is pressed
48 January 2016
FIGURE 3: Add your own programs to MENU.BAS to customize your Launchpad.
When you quit the program, don’t forget to copy it to
the SD card with SAVE “ MENU.BAS.” Here’s what’s going
on in the program:
• Lines 10-190 print the menu screen in white on a
blue background. Line numbers 80-160 are not used in
order to make room for future menu expansion for keys
• Lines 210-220 check for keystrokes until they find
one between 208 and 219 (F1 to F12), then continue the
program at line 230.
As mentioned earlier, getting the target programs to
restart the Launchpad app requires a slight change to each
target program. For COLORS.BAS, replace the END in line
125 with RUN “ MENU.BAS.” For KEYNUM.BAS, replace
the CLS: END in Line 160 with RUN “ MENU.BAS.” Do
this for any additional programs you create and add to
your Launchpad app.
• Line 240 directs program flow to a specific line
number, based on which function key was pressed. The
I hope your Amigo Launchpad will help showcase
your programming projects to family and friends!
GOTO command in Color BASIC can direct program flow
to the result of an expression, as well as an explicit line
number. Since the keystroke value in variable k is between
208 and 219 (inclusive), the expression 250 + (k-208) in
line 240 evaluates to 250 to 261, and the GOTO directs
program flow to the line number assigned to the selected
This little program exercises a couple of graphics
commands and the random number generator to produce
some artwork on the monitor. Use the editor to enter and
run the code below.
• Line 250 is the option to exit the program. It clears
the screen and ends the program.
• Line 251 instructs Color BASIC to load and run the
You should see a piece titled “Faces in the Crowd,”
and it won’t take you long to understand the name. Don’t
forget to SAVE “ FACES.BAS” after you’ve enjoyed the
Amigo art for a bit.
COLORS.BAS program. Doing this removes MENU.BAS
from program memory; we’ll need to make a minor
change to COLORS.BAS (discussed later) to automatically
return to the Launchpad program.
5 REM Faces in the Crowd ***
10 REM ... Your Amigo Does Art...
15 REDEFINE 33,60,66,165,129,165,153,66,60
20 COLOR 63,0