#assembly #architecture #register #jdh-8

bin+lib jasm

An assembler for the JDH-8 architecture

1 unstable release

0.1.0 Dec 21, 2023

#116 in #register

MIT license

14KB
227 lines

JASM

An assembler for the JDH-8 architecture written in Rust.

Assembler API

The assembler is available as a library on crates.io. Here is a basic example of how to use the API:

fn main() {
    let mut assembler = Assembler::new();

    // mw a, 4
    // mw b, 3
    // add a, b
    assembler.mw(Register::A, RegisterOrImm::Imm8(4));
    assembler.mw(Register::B, RegisterOrImm::Imm8(3));
    assembler.add(Register::A, RegisterOrImm::Reg(Register::B));

    let bytes = assembler.bytes();
}

License

JASM is licensed under the MIT License. See LICENSE for more details.

No runtime deps