Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The toolchain

bitterasm

CommandWhat it does
bitterasm compile prog.basm [-o prog.em]Expands the program and writes its emitted values to a .em file.
bitterasm check prog.basmRuns every check compile does, but writes nothing.
bitterasm expand prog.basmPrints the program with every macro call replaced by the macro’s body. Nothing is evaluated.
bitterasm doc <paths> [-o dir]Writes reference pages from doc comments; --test compiles their examples. See Generating docs.
bitterasm format <paths>Formats .basm files in place (fmt for short). See Formatting.

compile and check also take lint options (-A, -W, -D, -F) and output options (--diagnostic-format, --color). See Diagnostics and lints. compile --verbose shows progress and timing for each top-level call.

bitter

CommandWhat it does
bitter encode prog.em [-o prog.bin]Packs one .em file’s values into bytes.
bitter build a.basm [b.basm ...] [-o prog]Compiles every input, links them, packs the result and marks it executable.

bitter build runs the whole pipeline, so you don’t need the intermediate .em files. With several inputs, it joins their same-named sections and resolves pub labels across files. See Linking multiple files and Executables.

A typical session

bitterasm check hello.basm            # fast feedback while editing
bitter build hello.basm -o hello      # compile, link and pack
./hello