rustvm-assembler-0.2.0 is not a library.
English | 한국어
Rust Vm Assembler
RustVm-Assembler is a two-pass assembler for the 16-bit rustVM instruction set.
It uses a NASM-inspired syntax while providing an encoder and opcode table specifically designed for rustVM.
Features
- Two-pass assembly (symbol resolution + binary generation)
- NASM-inspired syntax
db/dwdirectives- Easy-to-extend lexer, encoder, and opcode table
- Command-line interface
Installation
Install from crates.io
Install from source
Verify the installation:
Usage
Assemble an assembly source file:
This generates:
input.bin
Specify a custom output file:
Display all available options:
Example
hello.asm
start:
movi r0, 123
hlt
Assemble it:
The generated binary can then be loaded into rustVM.
Supported Directives
| Directive | Description |
|---|---|
db |
Insert one or more bytes |
dw |
Insert one or more 16-bit words |
Example:
db 0x41, 0x42, 0x43
dw 0x1234
Project Structure
rva/
├── src/
│ ├── lexer.rs
│ ├── encoder.rs
│ ├── opcode_table.rs
│ └── main.rs
├── tests/
│ ├── (IS ANYBODY HERE??)
└── README.md
Related Projects
Roadmap
- Better diagnostics with line/column information
- Multi-file assembly
- Symbol visibility
- Object file generation
License
MIT OR Apache-2.0