Startup uses a three-stage approach:
- FLASH.BAS — a minimal hook file stored in flash memory that runs automatically at boot
- AUTO.BAS — the main environment setup script stored on the SD card (
B:\AUTO\AUTO.BAS) - MENU.BAS — A menu of programs in the \BASIC directory (
B:\AUTO\MENU.BAS)
FLASH.BAS is a minimal program whose only job is to call the second-stage loader on the SD card.
Save or update the file using one of:
FLASH SAVE 1or, if slot 1 is already occupied:
FLASH OVERWRITE 1To run FLASH.BAS automatically at every startup:
OPTION AUTORUN 1Located at B:\AUTO\AUTO.BAS, this script handles all environment configuration:
- Sets up the runtime environment
- Changes the current directory to
B:\BASIC - Launches the menu by running
B:\AUTO\MENU
Located at B:\AUTO\MENU.BAS, this script provides an interactive paginated menu of all .BAS files in the current directory (B:\BASIC).
- Scans the current directory for all
*.BASfiles usingDIR$() - Sorts the file list alphabetically using a bubble sort
- Displays up to 9 files per page with page
X of Yindicator - "Next Page" option only appears when more pages exist
- Select a program by number to launch it, or
0to go to the next page
- Loads all
*.BASfilenames into arrayA$()(supports up to 100 files) - Sorts the array alphabetically
- Displays a paginated menu with a yellow header and green file listing
- On selection, briefly displays the filename being launched, then runs it via
RUN
| Variable | Purpose |
|---|---|
A$() |
Array holding filenames |
N |
Total number of files found |
MAXP |
Total number of pages (INT((N-1)/9)+1) |
PAGE |
Current page number |
SEL |
Calculated array index of selected file |
Basic Programs Menu Page: 1 of 3
────────────────────────────────────────
1 ADVENT.BAS
2 BANNER.BAS
3 CALENDAR.BAS
4 CHESS.BAS
5 ELIZA.BAS
6 GAMES.BAS
7 HELLO.BAS
8 LIFE.BAS
9 LUNAR.BAS
0 Next Page ---->
────────────────────────────────────────
Select Program #? _
Power On
▼
MMBASIC starts
▼
Program stored in FLASH 1 is run (FLASH.BAS)
▼
FLASH.BAS calls B:\AUTO\AUTO.BAS
▼
AUTO.BAS sets up environment, changes dir to B:\BASIC
▼
AUTO.BAS runs B:\AUTO\MENU
▼
MENU.BAS displays paginated list of *.BAS files
▼
User selects a program → RUN A$(SEL)
| File | Location | Purpose |
|---|---|---|
FLASH.BAS |
Flash slot 1 | Minimal autorun hook; calls AUTO.BAS |
AUTO.BAS |
B:\AUTO\AUTO.BAS |
Environment setup and menu launcher |
MENU.BAS |
B:\AUTO\MENU.BAS |
Paginated interactive program menu |