diff --git a/LR35902/inc/LR35902.h b/LR35902/inc/LR35902.h index 5972251..5478cf1 100644 --- a/LR35902/inc/LR35902.h +++ b/LR35902/inc/LR35902.h @@ -197,7 +197,7 @@ namespace EightBit { uint8_t sra(uint8_t operand); uint8_t srl(uint8_t operand); - uint8_t bit(int n, uint8_t operand); + void bit(int n, uint8_t operand); static uint8_t res(int n, uint8_t operand); static uint8_t set(int n, uint8_t operand); diff --git a/LR35902/src/LR35902.cpp b/LR35902/src/LR35902.cpp index db302cc..d6df6a1 100644 --- a/LR35902/src/LR35902.cpp +++ b/LR35902/src/LR35902.cpp @@ -244,12 +244,11 @@ uint8_t EightBit::GameBoy::LR35902::srl(const uint8_t operand) { return (operand >> 1) & ~Bit7; } -uint8_t EightBit::GameBoy::LR35902::bit(const int n, const uint8_t operand) { +void EightBit::GameBoy::LR35902::bit(const int n, const uint8_t operand) { const auto carry = F() & CF; uint8_t discarded = operand; andr(discarded, 1 << n); setFlag(F(), CF, carry); - return operand; } uint8_t EightBit::GameBoy::LR35902::res(const int n, const uint8_t operand) {