Currently aligned VM version: c4bbaec62cddf3ae512e699b7faaa1fe90e74253
This is the development toolchain for lampvm.
This project is written in Rust, so you can compile it easily using cargo:
cargo build --releaseFor assemble:
./bin asm --input program.asm --output program.binFor compile C code:
./bin cc main.cDetailed information for C is in document
The assembler requires a config.yml file to be present in the current working directory.
By default, the configuration should look like this:
reg_count: 32
reg_prefix: "r"
macros:
MEM_SIZE: 4194304
IO_SIZE: 256
IVT_SIZE: 256
CALL_STACK_SIZE: 256
DATA_STACK_SIZE: 256
ISR_STACK_SIZE: 256
IVT_BASE: 0x0000
CALL_STACK_BASE: 0x800
DATA_STACK_BASE: 0x1000
PROGRAM_BASE: 0x201C
FB_WIDTH: 640
FB_HEIGHT: 480
FB_BPP: 4
FB_SIZE: 1228800
FB_BASE: 0x2D4000These settings are consistent with the VM's default configuration. In most cases, you do not need to change them. However, if you have a customized VM, please update this file to match your modifications.
✅ Support all instructions in lampVM
✅ Support labels
Support a subset of C