Only allow one of: exception, int, or soft int to occur during a cycle
This commit is contained in:
parent
b496d2eb90
commit
338b6fe496
|
@ -323,14 +323,12 @@ impl Cpu {
|
||||||
self.handle_exception(vector, self.next_exception_operand);
|
self.handle_exception(vector, self.next_exception_operand);
|
||||||
self.next_exception = None;
|
self.next_exception = None;
|
||||||
self.next_exception_operand = None;
|
self.next_exception_operand = None;
|
||||||
}
|
} else if let Some(vector) = self.next_soft_interrupt {
|
||||||
if let Some(vector) = self.next_soft_interrupt {
|
|
||||||
if self.flag.interrupt {
|
if self.flag.interrupt {
|
||||||
self.handle_interrupt(vector);
|
self.handle_interrupt(vector);
|
||||||
self.next_soft_interrupt = None;
|
self.next_soft_interrupt = None;
|
||||||
}
|
}
|
||||||
}
|
} else if let Some(vector) = self.next_interrupt {
|
||||||
if let Some(vector) = self.next_interrupt {
|
|
||||||
if self.flag.interrupt {
|
if self.flag.interrupt {
|
||||||
self.handle_interrupt(vector);
|
self.handle_interrupt(vector);
|
||||||
self.next_interrupt = None;
|
self.next_interrupt = None;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user