pub fn assemble_ir(
ir_string: &str,
labels: &mut HashMap<String, u32>,
pc: u32,
) -> Result<Option<u32>, AssemblerError>
Expand description
Assemble a single instruction.
Parameters:
ir_string: &str
: The instruction
labels: &mut std::collections::HashMap<String, u32>
: Map of labels
pc: u32
Current location of the program
Returns:
Result<Option<u32>>
: The assembled binary instruction, an error, or nothing.