sd-8516_stellar_basic_v1.0
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sd-8516_stellar_basic_v1.0 [2026/01/09 03:08] – appledog | sd-8516_stellar_basic_v1.0 [2026/01/10 02:02] (current) – appledog | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * Line-numbered programs | * Line-numbered programs | ||
| * '' | * '' | ||
| - | * `PRINT` | + | * '' |
| - | * `INPUT` | + | * '' |
| - | * `IF … THEN` | + | * '' |
| - | * `GOTO` | + | * '' |
| - | * `GOSUB` / `RETURN` | + | * '' |
| - | * `FOR` / `NEXT` | + | * '' |
| - | * Integer arithmetic | + | * Usually |
| - | * Single-letter variables (`A`–`Z`) | + | * Single letter variables (ex. '' |
| - | + | ||
| - | ### What’s usually removed | + | |
| * No floating-point math | * No floating-point math | ||
| - | * No strings (or very limited strings) | + | * Very limited strings |
| - | * No arrays | + | * No arrays |
| * No file I/O | * No file I/O | ||
| * Minimal error messages | * Minimal error messages | ||
| * Very limited editing commands | * Very limited editing commands | ||
| - | Some versions | + | Some versions |
| - | --- | + | == Example BASIC program |
| - | ## Size | + | <Code:Basic> |
| - | + | ||
| - | Typical Tiny BASIC interpreters: | + | |
| - | + | ||
| - | * **1–4 KB total** | + | |
| - | * Some famous versions were under **2 KB** | + | |
| - | * A few extreme versions fit in **less than 1 KB** | + | |
| - | + | ||
| - | This was achieved through: | + | |
| - | + | ||
| - | * Hand-written assembly | + | |
| - | * Tokenization | + | |
| - | * Shared code paths | + | |
| - | * Aggressive simplification of syntax | + | |
| - | + | ||
| - | --- | + | |
| - | + | ||
| - | ## Example: Tiny BASIC program | + | |
| - | + | ||
| - | ```basic | + | |
| 10 LET A = 1 | 10 LET A = 1 | ||
| 20 PRINT A | 20 PRINT A | ||
| Line 56: | Line 35: | ||
| 40 IF A <= 10 THEN GOTO 20 | 40 IF A <= 10 THEN GOTO 20 | ||
| 50 END | 50 END | ||
| - | ``` | + | </ |
| - | Many Tiny BASICs would allow this even shorter form: | + | Stellar BASIC will allow this even shorter form: |
| - | ```basic | + | < |
| 10 A=1 | 10 A=1 | ||
| 20 ?A | 20 ?A | ||
| 30 A=A+1 | 30 A=A+1 | ||
| 40 IF A<=10 GOTO 20 | 40 IF A<=10 GOTO 20 | ||
| - | ``` | + | </ |
| - | (`?` was often shorthand for `PRINT`.) | + | ('' |
| - | --- | + | == More Information |
| - | + | Notable Tiny BASIC implementations | |
| - | ## Notable Tiny BASIC implementations | + | |
| * **Palo Alto Tiny BASIC** (Dennis Allison) | * **Palo Alto Tiny BASIC** (Dennis Allison) | ||
| Line 79: | Line 57: | ||
| * **Apple I BASIC** (inspired by Tiny BASIC ideas) | * **Apple I BASIC** (inspired by Tiny BASIC ideas) | ||
| * **Micro-Soft 8080 BASIC** (larger, but influenced by Tiny BASIC work) | * **Micro-Soft 8080 BASIC** (larger, but influenced by Tiny BASIC work) | ||
| - | |||
| - | Each one differed slightly, but all followed the “tiny, usable, interactive” idea. | ||
| - | |||
| - | --- | ||
| - | |||
| - | ## Why Tiny BASIC matters | ||
| - | |||
| - | Tiny BASIC is important because it: | ||
| - | |||
| - | * Made programming accessible on the *cheapest possible hardware* | ||
| - | * Helped bootstrap the early microcomputer software ecosystem | ||
| - | * Demonstrated how interpreters could be **designed under extreme constraints** | ||
| - | * Influenced later minimal languages and embedded scripting systems | ||
| - | |||
| - | It’s often cited as an early example of **open, shared language design**, since many implementations were published openly in magazines. | ||
| - | |||
| - | --- | ||
| - | |||
| - | ## In one sentence | ||
| - | |||
| - | > **Tiny BASIC is a deliberately minimal BASIC interpreter, | ||
| - | |||
| - | If you’d like, I can: | ||
| - | |||
| - | * Show a **formal Tiny BASIC grammar** | ||
| - | * Compare Tiny BASIC vs Microsoft BASIC | ||
| - | * Explain how a Tiny BASIC interpreter works internally | ||
| - | * Show how to write your own Tiny BASIC in C or assembly | ||
sd-8516_stellar_basic_v1.0.1767928125.txt.gz · Last modified: by appledog
