From eb85d3aa25914c77e860ac9072cc5cf61f19051d Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Thu, 2 Feb 2023 11:55:04 +1100 Subject: [PATCH] cant pop to f --- src/processor/opcodes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/processor/opcodes.rs b/src/processor/opcodes.rs index 99bd2fb..ee66712 100644 --- a/src/processor/opcodes.rs +++ b/src/processor/opcodes.rs @@ -653,7 +653,7 @@ impl CPU { addr.set_low(self.ld_immediate_byte()); self.reg.set_8(Reg8::A, self.memory.get(addr)); } - 0xF1 => self.reg.af = self.pop_word(), + 0xF1 => self.reg.af = self.pop_word() & 0xF0, 0xF2 => { let mut addr: u16 = 0x0; addr.set_high(0xFF);