Prog8 Compiler Release History

A condensed timeline of major releases and significant changes in the Prog8 programming language compiler.

Note

The original Prog8 compiler was written in Python. The compiler was already implemented in Kotlin by the first public v1.0 beta release in January 2019. This document covers the Kotlin-era releases.

Summary of Major Language Milestones

Version

Milestone Feature

1.6

Address-of operator &

1.10

when statement (multi-way branch)

1.11

Structs (first introduction)

3.0

CPU registers removed, new loop syntax

4.0

CommanderX16 target support

5.0

Calling convention overhaul (registers for returns)

6.0

Virtual registers cx16.r0-r15

7.0

Structs removed

8.3

bool datatype

9.0

min/max/clamp builtins, @split arrays

9.3

Software evaluation stack removed

9.7

Unicode identifiers, continue statement

10.0

Short-circuit boolean logic

10.3

void keyword for multi-return

11.0

const long, split arrays by default

11.1

Multi-value returns from subroutines

11.4

on .. goto jump tables

12.0

``long`` datatype, structs reintroduced, typed pointers

12.1

swap() builtin, psg2 module, PET32 floats/gfx/snd, strings.split()/next_token(), C128 2MHz mode

12.2

Long loop support, private, enum syntax, 2D arrays, new modules (serial, wavfile, adpcm, lineclip)

12.3

Deterministic module search order, -srcdirs priority

14.0

32-bit m68k targets (amiga500, amiga1200, qemu68k), 32-bit virtual machine

Breaking Changes Summary

Major breaking changes that require code modifications when upgrading:

  • v3.0: CPU registers (A,X,Y) removed, loop syntax changed

  • v4.0: Module renames, mkword() parameter order flipped

  • v5.0: Calling convention overhaul

  • v5.3: Explicit & required for pointer assignments

  • v7.0: Structs removed, %target directive removed

  • v9.0: -target now required

  • v9.3: Eval stack removed (affects low-level code)

  • v10.0: push/pop moved to sys module

  • v10.2: Stricter boolean types

  • v10.4: Namespace reorganization (cx16 to cbm)

  • v12.0: Structs reintroduced (different from v1.11), typed pointers

  • v12.1: Combined virtual register renames (R0R1_32 → R0R1, etc.)

  • v12.2: swap() is now a statement (not a function), math.crc16() and math.crc16_start() require new parameters, private is now a reserved keyword

  • v12.3: Deterministic module search order, filesystem priority over internal resources

  • v14.0: list module renamed to lists, -expericodegen option renamed to -newcodegen, virtual target VM switched to 32-bit registers

2019 - Early Development

v1.0-v1.2 Beta - January-February 2019
  • First public release (v1.0 beta, 26 Jan)

  • Zeropage variable allocation and block-level variable initialization

  • Gradle build system, math optimizations, floatsafe zeropage mode

v1.3-v1.6 - March-April 2019
  • asmsub routines can return values in expressions

  • Address-of operator ``&`` implemented — replaces memory keyword

  • For loops can iterate over literal collections

  • New builtins: strlen(), sqrt16(), pow(), powf()

v1.7-v1.11 - April-July 2019
  • Array size optional with initializer

  • ``%asmbinary`` directive for assembly inclusion

  • AST-based Virtual Machine with optimization passes

  • ``when`` statement — new multi-way control flow

  • Structs added — composite datatype feature

v1.20 - July 2019
  • Struct literals — inline struct initialization

2020 - Language Maturation

v2.0-v2.3 - May-July 2020
  • Major compiler speedup (scope lookups, code generation)

  • Stricter type checking, optimized swap()

  • String value reassignment, new string functions (leftstr, rightstr, substr)

  • Subroutine inlining optimization

v3.0-v3.2 - July-August 2020
  • CPU register variables (A, X, Y) removed — use inline assembly

  • Loop syntax changes: repeat-until to do-until, new repeat X {}, forever {} removed

  • ``continue`` statement removed

  • ``sizeof()`` function added

  • Optimized in-place/augmented assignments — major performance boost

v4.0-v4.1 - August 2020
  • CommanderX16 target added — major platform expansion

  • Floating point support for CX16, VERA registers, 65c02 features

  • ``lsl()``/``lsr()`` removed — use <<=1/>>=1

  • Module renames (c64scr to txt), mkword() parameter order flipped

v4.2-v4.6 - September-October 2020
  • Cross-platform C64/CX16 compatibility

  • ``.w`` postfix removed — breaking syntax change

  • ``%option no_sysinit`` directive — skip system initialization

  • String escape characters: \\xHH, \\'

  • ``diskio`` module introduced — file I/O routines

  • Automatic string comparisons by value

v5.0-v5.4 - November-December 2020
  • Calling convention overhaul: args via variables, returns via registers

  • Explicit ``&`` required for string/array pointer assignments

  • ``in`` containment operator: if xx in [1,2,3]

  • Experimental C128 target

  • Pipe operator ``|>`` and string encoding syntax (iso:"hello")

  • ``@requirezp`` flag — force zeropage allocation

  • Rewritten variable allocation — large program size savings

2021-2023 - Advanced Features

v6.0-v6.4 - January-March 2021
  • Virtual registers ``cx16.r0..r15`` for CX16 and C64

  • New builtins: target(), offsetof(), memory(), cmp()

  • ``gfx2`` module — enhanced graphics with highres modes

  • ``peekw()``, ``pokew()`` — word memory access

  • IRQ handling routines for CX16

  • Improved RNG with seeded variants (rndseed, rndseedf)

  • Assembly new6502codegen completed — all expression types supported

v7.0-v7.9 - June 2021-March 2022
  • Struct feature removed — rewrite as separate variables

  • ``%target`` directive removed — use CLI options only

  • PET32 target — Commodore PET 4032 support

  • 2x faster multiplication and square root operations

  • Builtins: setlsb(), setmsb(), math.diff(), math.diffw()

v8.0-v8.14 - April 2022-May 2023
  • R39 CX16 ROM support

  • ``**`` operator removed — use floats.pow()

  • Experimental VM target with syscall builtin

  • API reorganization: trig/float functions moved to math/floats modules

  • ``bool`` datatype introduced — optimized true/false (0/1)

  • BSS section — uninitialized variables, reduced PRG size

  • ``divmod()``, ``divmodw()`` builtins

  • Major new6502codegen optimizations — significantly smaller and faster code

v9.0-v9.7 - June-December 2023
  • ``-target`` now required (c64 no longer default)

  • New builtins: min(), max(), clamp()

  • ``@split`` storage class — efficient LSB/MSB array storage

  • ``cbm`` module — all CBM kernal routines

  • Boolean ``when`` conditions

  • Underscores in numbers: 320_000

  • Multiple declarations/assignments: ubyte x,y,z and x=y=z=calculate()

  • ``continue`` statement for loops

  • Unicode identifiers: knäckebröd, π

  • Negative array indexing (Python-style)

  • Range containment: if x in 10 to 100

  • New modules: sprites (v9.4.1), verafx, emudbg and monogfx (v9.5)

2024–2026 — Modern Prog8

v10.0–v10.5 — January–November 2024
  • Short-circuit boolean evaluation (McCarthy logic)

  • Stricter boolean types — no longer equivalent to bytes, require explicit casting

  • ``void`` keyword — skip unused return values in multi-return assignments

  • Namespace reorganization: non-X16 variables moved from cx16 to cbm

  • Builtins removed: sort, reverse, any, all to anyall module

  • Compiler renamed to ``prog8c``

  • ``defer`` statement — delayed execution for resource cleanup

  • If-expression: result = if x>10 "yes" else "no"

  • Memory alignment: @alignword, @alignpage, @align64

  • Array literals with repetition: [42] * 99

v11.0–v11.4 — December 2024–June 2025
  • ``const long`` numbers — 32-bit integer literals

  • ``goto`` can jump to calculated addresses

  • Word arrays split by default (LSB/MSB in separate arrays)

  • Subroutines can return multiple values

  • Multi-value variable initialization: ubyte a,b,c = multi()

  • ``%output library`` and ``%jmptable`` directives — loadable libraries

  • ``%option romable`` — ROM-compatible code warnings

  • ROMABLE programs — no inline variables or self-modifying code

  • Range choices in ``when`` statements

  • Foenix F256 custom-target configuration example

  • Boolean virtual registers: cx16.r0bL, cx16.r0bH

  • ``on .. goto`` / ``on .. call`` — efficient jump tables

  • Float to int casts (truncating)

  • Double buffering in monogfx module

v12.0-v12.1 - November 2025-February 2026
  • ``long`` datatype — native 32-bit signed integers

  • Structs reintroduced — grouping multiple fields together

  • Typed pointers — can point to structs and specific types (not just uword addresses)

  • PET32 modules: petgfx, petsnd, diskio

  • New builtin: swap()

  • C128 enhancements: fast()/slow() for 2MHz mode

  • String operations: case-insensitive comparison, strings.split(), strings.next_token()

  • Virtual target improvements: f_seek(), f_tell(), diskname(), loadlib()

v12.2 - June 2026
  • Long loop support — for-loops with long counters on 6502, long math (division, sqrt, min/max/clamp/abs)

  • ``private`` keyword — for structs, enums, aliases, variables, and subroutines

  • Const pointers — compile-time constant-folding for const pointers

  • ``enum`` syntax — concise constant list declarations

  • 2D array support — ubyte[3][4] matrix

  • ``swap()`` is now a statement — more efficient than the previous builtin function

  • ``math.crc16()`` signature changed — now requires initvalue and xorout parameters for flexibility

  • New compiler options: -daemon (IDE integration), -nostdlib

  • New modules: serial (CX16 UART+ZiModem), lineclip, wavfile, adpcm

  • Fuzzy library search — -libsearch now automatically attempts a fuzzy search if no exact matches are found.

v12.3 — August 2026
  • Module search order rework — replaced alphabetical search with a deterministic, prioritized list; filesystem now searched before internal libraries.

  • Embedded arrays in structs — structs can now contain arrays as fields.

  • ``@bank`` accepts a subroutine name — for dynamic / overlay banking with a bank manager

  • ``%option private_symbols`` and ``public`` keyword — new option to make all symbols private by default; use public to selectively expose them. See Private and public symbols.

  • New library routines — floats.mod(); sys.MAX_LONG / sys.MIN_LONG; PET32 petsnd playback functions, REST constant, set_gap(), enharmonic flat note symbols; PET32 sys.set_irq() / sys.restore_irq(); serial module: configurable baud rate.

  • Breaking changes — -nostdlib removed; bankmanager renamed to bankselector; swap is now a statement.

v14.0 - beta releases from September 2026
  • Motorola 68000/68020 (m68k) support - a new, IR-based backend adds native compilation for the 68000 CPU family.

  • New compilation targets — amiga500 (68000), amiga1200 (68020 with optional FPU), and qemu68k (Qemu m68k simulator).

  • Experimental IR-based 6502 code generator option renamed from -expericodegen to -newcodegen.

  • Amiga library suite — the new targets ship far more than raw OS bindings: custom (hardware register access, chipset detection, display calculation, palette helpers, keyboard/mouse/joystick), the bare-metal blitter/copper/playfield/trackdisk helper modules, the OS-friendly easygfx wrapper, ptplayer/sound audio, and on-demand bindings for iffparse, datatype, asl, arexx, asyncio, icon and diskfont.

  • M68K stack frames and register allocation — ordinary subroutine locals and parameters now live in activation records on the CPU stack (A5 frame pointer), making subroutines recursive and re-entrant. An intraprocedural register allocator keeps hot values in hardware registers. asmsub routines must preserve D2-D6/A2-A4/FP2-FP7 (no clobbers() list); use %option noframe for subroutines that manipulate the stack themselves. Clean locals are zero-initialized on every call.

  • 32-bit virtual machine — the virtual target’s VM has been upgraded from its 8-bit origins to use 32-bit registers (m68k style), aligning it with the new m68k targets and making it a suitable execution platform for testing 32-bit code.

  • ``pointer`` type alias — a plain untyped address type that is 2 bytes (a uword) on the 8-bit targets and 4 bytes (a long) on the 32-bit m68k and virtual targets. See Structs and Pointers.

  • ``%assert`` directive — compile-time assertions for constant expressions.

  • Named struct-field initializers — struct pointer initializers can now use explicit field names (^^Enemy:[hp=100, x=10]), in any order, with omitted fields zero-initialized.

  • ``verafx`` line routine — new verafx-accelerated line drawing routine and the cobramk3 example that uses it.

  • C64 Vera64X support — added VERA library modules for C64 programs, including PSG access and a VERA-based music example.

  • ``defer`` is now program-wide — deferred blocks are also unwound when the program exits, or when return/exit() is used from the start() subroutine. Very useful to let programs cleanly return to the OS without forgetting to free resources.

  • Union types — union Name { ... } declarations where every field shares offset 0 and storage size equals the largest field; only zero-initialization ([]) is allowed, values must be written at runtime through typed pointers.

  • added arena memory allocation library

  • ``-o`` / ``–output`` compiler option - choose the exact file name and path of the output program file; all auxiliary output files (assembly, listing, monitor list, IR) are placed alongside it. Mutually exclusive with -out.

This document summarizes major and minor releases. Bugfix releases (e.g., v12.0.1, v12.1.1) are omitted for brevity.