1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-04 18:29:40 +00:00

Adds BIT.

This commit is contained in:
Thomas Harte 2021-01-20 21:41:43 -05:00
parent 64d556f60f
commit 04024ca159

View File

@ -349,8 +349,8 @@ template <Operation operation> void Executor::perform(uint8_t *operand [[maybe_u
// TODO:
//
// BRK, STP,
// ADC, SBC, BIT
// BRK, STP
// ADC, SBC
case Operation::ASL:
carry_flag_ = *operand >> 7;
@ -380,6 +380,12 @@ template <Operation operation> void Executor::perform(uint8_t *operand [[maybe_u
*operand = uint8_t((*operand >> 4) | (*operand << 4));
break;
case Operation::BIT:
zero_result_ = *operand & a_;
negative_result_ = *operand;
overflow_result_ = uint8_t(*operand << 1);
break;
/*
Operations affected by the index mode flag: ADC, AND, CMP, EOR, LDA, ORA, and SBC.
*/