IT WORKS HELL YEAH.
This commit is contained in:
@@ -141,6 +141,7 @@ impl fmt::Display for Opcode {
|
||||
|
||||
// special - generated by assembler
|
||||
Opcode::Data => write!(f, "data"),
|
||||
Opcode::Segment => write!(f, "[SEGMENT]"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -249,6 +250,7 @@ pub enum Opcode {
|
||||
|
||||
// fake instructions (these aren't present in the binary as instructions)
|
||||
Data,
|
||||
Segment,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -376,6 +378,7 @@ impl Opcode {
|
||||
Self::Hlt => Some(0x24),
|
||||
Self::Iadd => Some(0x25),
|
||||
Self::Isub => Some(0x26),
|
||||
Self::Segment => Some(0x27),
|
||||
// Pseudo-instructions don't have opcode values
|
||||
_ => None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user