finished initial interrupts implementation
This commit is contained in:
@@ -54,12 +54,14 @@ impl Encode for Instruction {
|
||||
],
|
||||
no_args: [Nop, IntReturn, Halt],
|
||||
special: [
|
||||
Self::Interrupt(_) => todo!(),
|
||||
Self::Data(data) => data,
|
||||
Self::Interrupt(interrupt) => {
|
||||
let opcode = u32::from(self.opcode());
|
||||
(opcode << 26) | u32::from(interrupt.as_u8())
|
||||
},
|
||||
Self::Segment(segment) => {
|
||||
let opcode = u32::from(self.opcode());
|
||||
let segment = segment as u8;
|
||||
(opcode << 26) | u32::from(segment)
|
||||
(opcode << 26) | u32::from(segment as u8)
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user