Work in progress. This project is under development; expect missing features and breaking changes.
A Common Lisp library and DSL for building fantasy assemblers and CPU emulators: given a declarative spec of a machine's storage, instruction encoding, and semantics, LASM generates a lexer/parser for its assembly syntax, an assembler, and an emulator. It targets custom ("fantasy") architectures, not real silicon.
Clone into Quicklisp's local-projects:
git clone https://github.com/takeiteasy/lasm ~/quicklisp/local-projects/lasmStart with Getting started, then browse the documentation index for machine definitions, assembly, emulation and tools.
(asdf:load-system :lasm)
(in-package #:lasm)
(defmachine sixtyfoo
(register a :width 8)
(stack s :width 8 :depth 256)
(memory ram :width 8 :addr-width 16)
(flags z n c v))
(with-machine (m sixtyfoo)
(set! a 42)
(push a s))Full emulators packaged as ASDF systems are listed in Examples.
Copyright (C) 2026 George Watson. LASM is licensed under GPL-3.0-or-later.