This is an old revision of the document!
Buzz Assembly Language Specification
The Buzz Virtual Machine (BVM) is a stack machine that works with a custom assembly language. The instruction set is composed of 46 elements, explained in the table below.
Each command can be used either by writing Buzz Assembly code directly (in a .basm
file), or through C-functions. The table below reports both the plain assembly command and the corresponding C function, along with a brief description of the effect of a command.
Command | C function | Description |
---|---|---|
nop | No operation | |
done | buzzvm_done(vm) | Ends the execution |
pushnil | buzzvm_pushnil(vm) | Pushes nil on the current stack |
dup | buzzvm_dup(vm) | Pushes the stack-top value on the current stack |
pop | buzzvm_pop(vm) | Removes the stack-top value from the current stack |