# batpu-assembly
batpu-assembly is a [Rust](https://www.rust-lang.org/) library for assembly work for the [BatPU-2](https://github.com/mattbatwings/BatPU-2) ([ISA](https://docs.google.com/spreadsheets/d/1Bj3wHV-JifR2vP4HRYoCWrdXYp3sGMG0Q58Nm56W4aI)).

## Example
```rust
let mut instructions: Vec<Instruction> = Vec::new();
let labels = HashMap::new();

instructions.push(
    // Loads 5 into r1
    Instruction::LoadImmediate(
        Register(u4!(1)),
        Immediate(5)
    )
);

let binary = instructions_to_binary(instructions, &labels).unwrap();
```
