Skip to content
takeiteasyPublic

About

Define CPU architectures + assembly in a DSL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

402 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LASM — Lisp Assembly

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.

Installation

Clone into Quicklisp's local-projects:

git clone https://github.com/takeiteasy/lasm ~/quicklisp/local-projects/lasm

Documentation

Start with Getting started, then browse the documentation index for machine definitions, assembly, emulation and tools.

Quickstart

(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))

Examples

Full emulators packaged as ASDF systems are listed in Examples.

License

Copyright (C) 2026 George Watson. LASM is licensed under GPL-3.0-or-later.

About

Define CPU architectures + assembly in a DSL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages