From 9bc8d85795b8a658917c5fed2e89b4f4b779c678 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Tue, 12 Nov 2019 22:40:21 +0000 Subject: [PATCH] Tidy the Z80 RES implementation a little. Signed-off-by: Adrian Conlon --- Z80/src/Z80.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Z80/src/Z80.cpp b/Z80/src/Z80.cpp index ae2b7de..11597bb 100644 --- a/Z80/src/Z80.cpp +++ b/Z80/src/Z80.cpp @@ -459,7 +459,7 @@ void EightBit::Z80::bit(uint8_t& f, const int n, const uint8_t operand) { uint8_t EightBit::Z80::res(const int n, const uint8_t operand) { ASSUME(n >= 0); ASSUME(n <= 7); - return operand & ~Chip::bit(n); + return clearBit(operand, Chip::bit(n)); } uint8_t EightBit::Z80::set(const int n, const uint8_t operand) {