POP: Don't allow F.low to be set
This commit is contained in:
parent
fad95d5046
commit
f760b96d19
@ -624,6 +624,9 @@ mod instructions {
|
|||||||
}
|
}
|
||||||
pub fn insn_pop(&mut self, reg: R16Stack, bus: &mut impl BusIO) -> IResult {
|
pub fn insn_pop(&mut self, reg: R16Stack, bus: &mut impl BusIO) -> IResult {
|
||||||
self[reg].0 = self.pop16(bus)?;
|
self[reg].0 = self.pop16(bus)?;
|
||||||
|
if let R16Stack::AF = reg {
|
||||||
|
self.af.wide_mut().0 &= 0xfff0; // lo flags should never be set
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user