| | {{infobox |
| | | title = AdaLogic BASIC |
| | | designed_by = Rocky L. Oliver |
| | | developer = Oliver Softworks |
| | | appeared = 2017 (roots in AdaLog and RockyBASIC) |
| | | typing = Static — sized integers, floats, vectors/matrices, temporal types |
| | | paradigm = Multi-paradigm — event-driven, structured, transpiler |
| | | files = .alb (program) · .albi (include) |
| | | license = Apache 2.0 (compiler & toolchain) |
| | | family = [[BASIC]] · Ada |
| | | website = [alb-lang.org](/) · [alb-lang.com](https://alb-lang.com) |
| | }} |
| | |
| | **AdaLogic BASIC** (**ALB**) is a complete programming language and SDK — a modern BASIC dialect built for learning and for building real software, from games to tools to full applications. It pairs a deliberately beginner-readable surface syntax with a strict static type system, an event-driven program model, and a native toolchain. |
| | |
| + | ```alb Told by Rocky L. Oliver |
| + | This page is the author's own account — the story of ALB in my own words. Every fact stands as written; the voice is simply mine. |
| + | ``` |
| + | |
| | ```alb |
| | The 1964 bet, kept: programming belongs to everyone. |
| | ``` |
| | |
| | ## History |
| | |
| | ### Origins |
| | |
| - | ALB's story starts with its author, **Rocky L. Oliver** (born June 10, 2000), and an early brush with computing gone wrong. As a very young child — kindergarten or thereabouts — he had a teacher who split the class into students she believed she could teach and students she simply stopped helping. The day the class first used a computer, Oliver had never touched one (his family had no computer at home) and got no instruction beyond "go type this." Fellow students tried to help; the teacher did not. He went home each day with stacks of homework instead. His mother eventually homeschooled him, and he thrived. |
| + | My story starts with an early brush with computing gone wrong. I was born June 10, 2000, and as a very young child — kindergarten or thereabouts — I had a teacher who split the class into students she believed she could teach and students she simply stopped helping. The day the class first used a computer, I had never touched one (my family had no computer at home) and got no instruction beyond "go type this." Fellow students tried to help; the teacher did not. I went home each day with stacks of homework instead. My mother eventually homeschooled me, and I thrived. |
| | |
| - | At thirteen he got his first computer — a cheap, unreliable laptop. Keeping it running was an education in itself: fixing things, cleaning off viruses and malware, learning the machine by rescuing it. Around then he got hold of three programming books — *Let Us C*, *Ada as a Second Language*, and *Beginning C++ Game Development* — famously unforgiving texts for a teenager teaching himself. By fifteen he was writing real software. |
| + | At thirteen I got my first computer — a cheap, unreliable laptop. Keeping it running was an education in itself: fixing things, cleaning off viruses and malware, learning the machine by rescuing it. Around then I got hold of three programming books — *Let Us C*, *Ada as a Second Language*, and *Beginning C++ Game Development* — famously unforgiving texts for a teenager teaching himself. By fifteen I was writing real software. |
| | |
| | ### RockyBASIC and the first compilers |
| | |
| - | His first language project was a small compiler/interpreter called **RockyBASIC**, named after himself. Around the same period he built **ASCII Zombies**, a game written in pure C++ — a project currently being redesigned in ALB under the name **Red Sector**. |
| + | My first language project was a small compiler/interpreter called **RockyBASIC**, named after myself. Around the same period I built **ASCII Zombies**, a game written in pure C++ — a project I'm currently redesigning in ALB under the name **Red Sector**. |
| | |
| - | Then, in **August 2014**, everything stopped: the family home burned down, and there was basically nothing left — including the machine and the work on it. He was fourteen. RockyBASIC’s development ended there. |
| + | Then, in **August 2014**, everything stopped: our family home burned down, and there was basically nothing left — including the machine and the work on it. I was fourteen. RockyBASIC's development ended there. |
| | |
| | ### The lost years (2014–2017) |
| | |
| - | For roughly a year and a half there was nothing to build on. The family had lost nearly everything — living with little more than the clothes they had, eventually in a camper. Oliver kept going anyway: experimenting with **Commodore 64 and DOS** — mostly on emulators, sometimes real hardware — and studying history, science, math, and programming/cybersecurity on his own. |
| + | For roughly a year and a half there was nothing to build on. We had lost nearly everything — living with little more than the clothes we had, eventually in a camper. I kept going anyway: experimenting with **Commodore 64 and DOS** — mostly on emulators, sometimes real hardware — and studying history, science, math, and programming/cybersecurity on my own. |
| | |
| - | Recovery came one machine at a time. A cheap thrift-store laptop came first — not very good, but a start. Then family friends gave him a workstation with a literal name label on it: an **HP Z230** (16 GB RAM, Intel i5-4590), gifted so he could get back to schoolwork. It helped — he was far behind — but about three or four months later he drew up a roughly **$300 budget build**: a $15 case, a GTX 950, the workstation's parts, spare rigging — a real desktop with real power at last. (The Z230 was later reassembled and went back into service once he had more machines.) |
| + | Recovery came one machine at a time. A cheap thrift-store laptop came first — not very good, but a start. Then family friends gave me a workstation with a literal name label on it: an **HP Z230** (16 GB RAM, Intel i5-4590), gifted so I could get back to schoolwork. It helped — I was far behind — but about three or four months later I drew up a roughly **$300 budget build**: a $15 case, a GTX 950, the workstation's parts, spare rigging — a real desktop with real power at last. (The Z230 was later reassembled and went back into service once I had more machines.) |
| | |
| | The gap years produced small languages and tools of their own: |
| | |
| - | - **Graefait** — a Borland-style library providing a `graphics.h` header for 64-bit Windows, written to replace the DOS-era graphics lessons his school assignments assumed |
| + | - **Graefait** — a Borland-style library providing a `graphics.h` header for 64-bit Windows, written to replace the DOS-era graphics lessons my school assignments assumed |
| | - **nandlib** — a NAND-logic language built in NASM, usable from C |
| - | - **Keystone** — an experimental language made of clever FASM macros; he wrote a text adventure in it, which is about as far as it went |
| + | - **Keystone** — an experimental language made of clever FASM macros; I wrote a text adventure in it, which is about as far as it went |
| | |
| | *Graefait and nandlib are planned to be hosted here for anyone who wants to download or use them.* |
| | |
| | ### The return (2017) |
| | |
| - | He had tried other BASIC-family languages before the fire — GLBasic, PureBasic — and liked them, but none met his exact requirements. In the rebuild years his C/C++ game engine — the one behind *ASCII Zombies*, *Riverine Commando*, *Bitland Wars*, *Fractal Lands* — evolved into an **Ada-based engine**, and it needed a quick way to script enemies and game logic. The small DSL he wrote for it was called **AdaLog**. That name — Ada plus logic — is where **AdaLogic** comes from. |
| + | I had tried other BASIC-family languages before the fire — GLBasic, PureBasic — and liked them, but none met my exact requirements. In the rebuild years my C/C++ game engine — the one behind *ASCII Zombies*, *Riverine Commando*, *Bitland Wars*, *Fractal Lands* — evolved into an **Ada-based engine**, and it needed a quick way to script enemies and game logic. The small DSL I wrote for it was called **AdaLog**. That name — Ada plus logic — is where **AdaLogic** comes from. |
| | |
| - | By then he had squeezed everything he could out of SDL and Raylib. A solid engine API, more bindings, more wrappers — and in **2017** he came back to the language itself "with a fury," rewriting the entire compiler in **Ada 2012**. |
| + | By then I had squeezed everything I could out of SDL and Raylib. A solid engine API, more bindings, more wrappers — and in **2017** I came back to the language itself "with a fury," rewriting the entire compiler in **Ada 2012**. |
| | |
| | ### The modern toolchain |
| | |
| - | By that point Oliver had also mastered **FASM** (the flat assembler) after years of struggling with other assemblers — so the early ALB toolchain was built directly on FASM rather than on any existing infrastructure. |
| + | By that point I had also mastered **FASM** (the flat assembler) after years of struggling with other assemblers — so the early ALB toolchain was built directly on FASM rather than on any existing infrastructure. |
| | |
| | One deliberate constraint shaped everything: **no conventional intermediate representation**. No LLVM, no borrowed backend. The first three or so code-generation backends were written completely by hand. By the time they existed, AI-assisted development was on the rise, and development speed accelerated rapidly on top of that foundation. |
| | |
| | ```fact No borrowed infrastructure |
| | The ALB compiler has **no LLVM-style IR** — every code-generation backend was written by hand. What a program compiles to is code the project itself owns, end to end. |
| | ``` |
| | |
| | Today the compiler has **many backends** — including **FASM, FASM16, and C** — and the SDK ships with thick and thin bindings across its targets. |
| | |
| | ## Design philosophy |
| | |
| | ALB's surface is BASIC-flavored, but its decisions are deliberate: |
| | |
| - | * **`--` comments**, borrowed from Ada — chosen simply because the author likes the clean style (classic `REM` is *not* ALB syntax). |
| + | * **`--` comments**, borrowed from Ada — chosen simply because I like the clean style (classic `REM` is *not* ALB syntax). |
| | * **Case-insensitive keywords** — `PRINT`, `print`, and `Print` are the same word, as in classic BASIC. |
| | * **A real static type system** — sized integers (`U8`–`U64`, `I8`–`I64`, `S32`), floats (`F64`/`REAL`, `PURE`/`RATIONAL`), vector/matrix types (`FLOAT2`, `FLOAT4`, `MAT2`–`MAT4`), `BOOL`, `STRING`, `BINARY`, and hardware-sized `HW8`/`HW16`/`HW32` types. |
| | * **1-based arrays** — index 0 is out of bounds, matching how newcomers count. |
| | * **An event-shaped program model** — `ON TICK` holds update logic and `ON PAINT` holds drawing, so a beginner always knows exactly where code goes. No guessing which loop owns what. |
| | * **Temporal variables** — `HISTORY` and `TEMPORAL` declarations record a variable's values over time, enabling runtime debugging where you can *reverse computation* and step back through a program's history. |
| | * **`PARALLEL` blocks** — parallel arrays made ergonomic without losing speed. |
| | * **Hand-written backends** — the no-IR constraint keeps the whole pipeline understandable and self-owned. |
| | |
| | ```warn Coming from classic BASIC? |
| | `REM` is **not** a comment in ALB — comments start with `--`, Ada-style. And while keywords are case-insensitive, `LET` is for first declarations only. |
| | ``` |
| | |
| | ## Syntax tour |
| | |
| | The tour below covers the shape of the language — the [official handbook](/handbook) is the verified syntax sheet (the cheat sheet), [Learn](/learn) has guided lessons, the [examples gallery](/examples) has runnable demos, and the [lexicon](/lexicon) explains the terms. |
| | |
| | |
| | ### Program skeleton |
| | |
| | ``` |
| | BEGIN |
| | VERSION 0.0.0.1 |
| | CREATE_WINDOW "ALB APP", 960, 640 |
| | |
| | ON TICK |
| | -- update logic |
| | END ON |
| | |
| | ON PAINT |
| | -- draw logic |
| | END ON |
| | |
| | LISTEN |
| | END |
| | ``` |
| | |
| | Every program starts with `BEGIN`. The optional `VERSION` tag stamps the source's own version. `LISTEN` starts the event loop; `ON TICK` and `ON PAINT` separate simulation from rendering. |
| | |
| | ### Declarations |
| | |
| | ``` |
| | #MAX_ENTITIES = 64 |
| | LET score = 0 |
| | LET hp AS U16 = 100 |
| | LET name AS STRING = "ALB" |
| | TYPE SmallHealth IS U16 RANGE 1 .. 255 TEMPORAL |
| | LET px AS I32 HISTORY 16 = 140 |
| | ``` |
| | |
| | `LET` declares variables, optionally with explicit types. `TYPE` creates constrained types — `RANGE` bounds and `TEMPORAL`/`HISTORY` make a value replayable. `#NAME = value` defines a constant. |
| | |
| | ### Control flow |
| | |
| | ``` |
| | IF hp > 0 THEN |
| | LET alive = TRUE |
| | ELSE |
| | LET alive = FALSE |
| | END IF |
| | |
| | WHILE hp > 0 |
| | LET hp = hp - 1 |
| | END WHILE |
| | |
| | FOR i = 1 TO 10 THEN |
| | PRINT i |
| | END FOR |
| | |
| | MATCH mode |
| | 0 => state = 1 |
| | ELSE => state = 99 |
| | END MATCH |
| | ``` |
| | |
| | Structured `IF/ELSE`, `WHILE`, `FOR`, and `MATCH` arms with `=>`. `SELECT` uses `CASE`. Keywords are case-insensitive throughout. |
| | |
| | ### Functions, modules, files |
| | |
| | ``` |
| | FUNCTION Twice(x AS U32) AS U32 |
| | RETURN x + x |
| | END FUNCTION |
| | |
| | MODULE MathKit |
| | BEGIN |
| | FUNCTION Add2(x AS U32) AS U32 |
| | RETURN x + 2 |
| | END FUNCTION |
| | END MODULE |
| | |
| | IMPORT MathKit |
| | ``` |
| | |
| | `.alb` is a main file; `.albi` is an include file. Modules and namespaces are the real organization mechanism, though — the extensions are a convention, and an include can live in any file name you like. |
| | |
| | ### Arrays and PARALLEL |
| | |
| | ``` |
| | STRICT cells[64] AS U16 |
| | LET cells[1] = 10 |
| | |
| | PARALLEL swarm[128] |
| | x AS S32 |
| | y AS S32 |
| | hp AS U16 |
| | END PARALLEL |
| | ``` |
| | |
| | Arrays are 1-based and statically typed; `PARALLEL` declares structure-of-arrays-style records with the ergonomics of a struct and the layout of parallel columns. |
| | |
| | ## Toolchain |
| | |
| - | ALB compiles through a **master driver**, `alb.exe` (currently 0.2.0), which routes a program to one of many managed backend compilers. The compiler was written by hand with **no LLVM-style IR**, and ALB can build anything C, FASM, or TypeScript can build — through thick and thin bindings. |
| + | ALB compiles through a **master driver**, `alb.exe` (currently 0.2.0), which routes a program to one of many managed backend compilers. I wrote the compiler by hand with **no LLVM-style IR**, and ALB can build anything C, FASM, or TypeScript can build — through thick and thin bindings. |
| | |
| | ```flow One source, many worlds |
| | game.alb |
| | | |
| | v |
| | alb.exe (master driver) |
| | | |
| | +---> albt (native) ---> FASM / FASM16 / C -----> .exe |
| | +---> albw (web) ---> TypeScript -----------> browser / Node |
| | +---> alb_65 (c64) ---> 6502 -----------------> .prg |
| | +---> albr/albh/albo ---> Rust / Haskell / Odin -> native |
| | +---> albp/albl/albm ---> Python / Lua / Moon ---> SDL3 apps |
| | +---> albj/albn/alba ---> Java / .NET / Ada -----> native |
| | +---> albf ---> Brainfuck ------------> .bf |
| | ``` |
| | |
| | ``` |
| | alb native game.alb -t fasm --build --outdir build/game |
| | alb web game.alb --build --target es2020 |
| | alb c64 demo.alb --build --outdir build/c64 |
| | ``` |
| | |
| | ### Backends |
| | |
| | Every backend has short aliases (`ts`, `rs`, `hs`, `py`, `6502`…); `alb list` shows them all. |
| | |
| | | Command | Executable | What it targets | |
| | | --- | --- | --- | |
| | | `native` | `albt.exe` | Universal compiler: FASM, FASM16, C | |
| | | `web` | `albw.exe` | TypeScript, browser, and Node | |
| | | `c64` | `alb_65.exe` | Commodore 64 / 6502 | |
| | | `brainfuck` | `albf.exe` | Brainfuck (ALBB) native emitter | |
| | | `java` | `albj.exe` | Java / FlatJVM | |
| | | `dotnet` | `albn.exe` | .NET / C# | |
| | | `ada` | `alba.exe` | Native Ada | |
| | | `python` | `albp.exe` | Python | |
| | | `lua` | `albl.exe` | Lua (SDL3 graphics) | |
| | | `moon` | `albm.exe` | MoonScript (SDL3 graphics) | |
| | | `rust` | `albr.exe` | Rust (rustc) | |
| | | `haskell` | `albh.exe` | Haskell / GHC (SDL3) | |
| | | `odin` | `albo.exe` | Odin (SDL3 graphics) | |
| | | `nasm` | `albnasm.exe` | NASM assembly (win64) | |
| | | `godot` | `albgd.exe` | Godot | |
| | | `player` | `alb_player.exe` | ALB program player | |
| | | `agent` | `veronica_main.exe` | Veronica coding agent | |
| | | `prompt` | `alb_prompt.exe` | Prompt and model utility | |
| | |
| | ### Polyglot blocks |
| | |
| | ALB programs can embed foreign-language modules inline — ENABLE blocks for C, Ada, ASM, Python, Java, C#, and TypeScript/JavaScript — in the entry file or in INCLUDE files. `alb polyglot inspect|build|run` compiles the modules and the ALB host together into one all-language program. |
| | |
| | ### Packages, tools, doctoring |
| | |
| | - `alb pkg` — the package manager (`alb-pkg.exe`); `alb pkg install core` pulls lean, version-locked toolchain packs |
| | - `alb tool <name>` — run a bundled dependency directly (GCC, dotnet, Node) — offline-friendly |
| | - `alb doctor` / `alb deps` — verify compilers and the version-locked dependency bundle |
| | - `alb compile --backend <name>`, `--verbose`, `--dry-run` — routing control and inspection |
| | |
| | ### Graphics RHI |
| | |
| | `--gfx=<backend>` selects the **alb_gfx** rendering backend DLL at compile time: **OpenGL, Vulkan, or Direct3D 6 through 12**. |
| | |
| | ### Includes |
| | |
| | `INCLUDE "local.albi"` pulls a source-local file; `INCLUDE <alb_gfx.albi>` pulls a system/stdlib include from the SDK's `stdlib/vendor/` directories. |
| | |
| | ### The web IDE |
| | |
| | ```note |
| - | The **browser IDE** ([alb-lang.org/alb-ide](/alb-ide/)) is half ALB, half JavaScript — written to solve the need for a web-based editor, and not a reflection of what a desktop IDE would be. |
| + | The **browser IDE** ([alb-lang.org/alb-ide](/alb-ide/)) is half ALB, half JavaScript — I wrote it to solve the need for a web-based editor; it isn't a reflection of what a desktop IDE would be. |
| | ``` |
| | |
| | The full toolchain — now Apache 2.0 open source — lives on [GitHub](https://github.com/rockyoliver454/AdaLogic-BASIC-ALB-Programming-Language) and is distributed through [alb-lang.com](https://alb-lang.com). |
| | |
| | ## Licensing |
| | |
| | ```fact Apache 2.0 — October 8, 2026 |
| | The entire compiler and toolchain is **open source under the Apache 2.0 license** — every backend, every SDK tool, on [GitHub](https://github.com/rockyoliver454/AdaLogic-BASIC-ALB-Programming-Language). The web platform — IDE, lessons, examples, this wiki — remains free for everyone. |
| | ``` |
| | |
| | ## Who it's for |
| | |
| - | Scientists, kids, teachers, hobbyists, game jams, and professionals — anything another language can build, ALB aims to build too. |
| + | Scientists, kids, teachers, hobbyists, game jams, and professionals — anything another language can build, ALB aims to build too. That was the whole point from the start: a language that treats a kindergartner's first `PRINT` and a professional's deadline as equally worth building for. |
| | |
| | ```alb The living descendant |
| | From [[BASIC|Dartmouth BASIC, 1964]] to ALB — the line numbers are gone, the idea isn't. [[History of Programming]] · [[BASIC]] |
| | ``` |
| | |
| | ## See also |
| | |
| | ### On this wiki |
| | |
| | - [[Main Page]] |
| | - [[Wiki Help]] |
| | - [[BASIC]] — the whole family tree ALB descends from |
| | - [[History of Programming]] — ALB's place in the long arc |
| | - [[Red Sector]] — the in-development ALB remake of ASCII Zombies |
| | |
| | ### On this site |
| | |
| | - [Handbook](/handbook) — the verified syntax sheet; the cheat sheet |
| | - [Browser IDE](/alb-ide/) — write and run ALB in your browser |
| | - [Learn](/learn) — guided lessons |
| | - [Examples](/examples) — runnable demos |
| | - [Lexicon](/lexicon) — ALB terms and vocabulary |
| | - [ALB SCAN](/scan) — static analysis for ALB programs |
| | - [Toolkit](/alb-toolkit) — utilities built in ALB |
| | - [Help](/help) — getting unstuck |
| | - [Forum](/forum) — the community |
| | |
| | [[Category:Language]] |
| | [[Category:AdaLogic BASIC]] |
| | |