Tiny Macro Lisp for COR24 — a minimal Lisp-1 with lexical scope, unhygienic defmacro, closures, mark-sweep GC, and tail-call optimization. Compiles to COR24 24-bit RISC assembly.
Forked from sw-vibe-coding/tml24c as part of the COR24 ecosystem consolidation.
Built on:
- sw-cor24-x-tinyc — Tiny COR24 C compiler (Rust)
- sw-cor24-emulator — COR24 assembler and emulator
just build # compile
just test # run test suite
just run # interactive REPL (Ctrl-] to exit)
just eval <file> # evaluate a .l24 file- Types: fixnums, symbols, cons pairs, strings, closures, macros, primitives
- Special forms:
quote,if,define,set!,lambda,defmacro,begin,quasiquote - Standard prelude: 60+ functions and macros including
map,filter,reduce,let,cond,and,or,->,->>, lazy sequences, anaphoric macros, and more - Tail-call optimization:
if,begin, and closure application - Conservative GC: scans C stack for heap pointers — no manual root management
- Multi-line REPL: paren-depth tracking across newlines
- I/O:
peek/pokefor memory-mapped hardware,displayfor UART output
See docs/demos.md for the full list. Highlights:
just demo-bottles # 99 Bottles of Beer (macro + tail recursion)
just demo-bottles2 # 99 Bottles (trampoline mutual recursion)
just eval demos/lazy.l24 # infinite sequences
just eval demos/anaphora.l24 # anaphoric macros (aif, awhen)
just eval demos/threading.l24 # -> and ->> pipelines
just eval demos/mutation.l24 # set!, counters, memoization| Document | Description |
|---|---|
| demos.md | Demo descriptions and commands |
| porting-clojure.md | Clojure-to-tml24c feature mapping and translation guide |
| true-and-nil-patterns.md | Truth, nil, and boolean conventions |
| prelude-choices.md | Prelude tiers (tiny/standard/full/experimental) |
| plan.md | Implementation plan and future roadmap |
| bugs.md | Known issues |
- Blog: Software Wrighter Lab
- Discord: Join the community
- YouTube: Software Wrighter
Copyright (c) 2026 Michael A. Wright
MIT -- see LICENSE for details.