IT WORKS HELL YEAH.

This commit is contained in:
2025-06-18 22:53:01 +01:00
parent 1210b19333
commit e281bc2d1d
26 changed files with 715 additions and 188 deletions
+3
View File
@@ -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,
}