mirror of
https://github.com/mre/mos6502.git
synced 2025-02-20 09:29:02 +00:00
PLA opcode should update the flags
This commit is contained in:
parent
26a2f51bc6
commit
f0fc9829db
@ -435,6 +435,14 @@ impl<M: Bus> CPU<M> {
|
||||
self.pull_from_stack();
|
||||
let val: u8 = self.fetch_from_stack();
|
||||
self.registers.accumulator = val as i8;
|
||||
self.registers.status.set_with_mask(
|
||||
Status::PS_ZERO | Status::PS_NEGATIVE,
|
||||
Status::new(StatusArgs {
|
||||
zero: val == 0,
|
||||
negative: self.registers.accumulator < 0,
|
||||
..StatusArgs::none()
|
||||
}),
|
||||
);
|
||||
}
|
||||
(Instruction::PLP, OpInput::UseImplied) => {
|
||||
// Pull status
|
||||
|
Loading…
x
Reference in New Issue
Block a user