mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Fixed half carry after logical operation.s
This commit is contained in:
parent
d50d3fc837
commit
efe354a7b1
@ -595,6 +595,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
|
|
||||||
case MicroOp::And:
|
case MicroOp::And:
|
||||||
a_ &= *(uint8_t *)operation->source;
|
a_ &= *(uint8_t *)operation->source;
|
||||||
|
half_carry_flag_ = Flag::HalfCarry;
|
||||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||||
parity_overflow_flag_ = 0;
|
parity_overflow_flag_ = 0;
|
||||||
set_parity(a_);
|
set_parity(a_);
|
||||||
@ -602,6 +603,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
|
|
||||||
case MicroOp::Or:
|
case MicroOp::Or:
|
||||||
a_ |= *(uint8_t *)operation->source;
|
a_ |= *(uint8_t *)operation->source;
|
||||||
|
half_carry_flag_ = 0;
|
||||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||||
parity_overflow_flag_ = 0;
|
parity_overflow_flag_ = 0;
|
||||||
set_parity(a_);
|
set_parity(a_);
|
||||||
@ -609,6 +611,7 @@ template <class T> class Processor: public MicroOpScheduler<MicroOp> {
|
|||||||
|
|
||||||
case MicroOp::Xor:
|
case MicroOp::Xor:
|
||||||
a_ ^= *(uint8_t *)operation->source;
|
a_ ^= *(uint8_t *)operation->source;
|
||||||
|
half_carry_flag_ = 0;
|
||||||
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
sign_result_ = zero_result_ = bit5_result_ = bit3_result_ = a_;
|
||||||
parity_overflow_flag_ = 0;
|
parity_overflow_flag_ = 0;
|
||||||
set_parity(a_);
|
set_parity(a_);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user