mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Fixes memptr for IN C, (C).
This commit is contained in:
parent
3b0df172a7
commit
ec82c075be
@ -805,9 +805,19 @@ template < class T,
|
|||||||
subtract_flag_ = half_carry_result_ = 0;
|
subtract_flag_ = half_carry_result_ = 0;
|
||||||
sign_result_ = zero_result_ = bit53_result_ = *static_cast<uint8_t *>(operation->source);
|
sign_result_ = zero_result_ = bit53_result_ = *static_cast<uint8_t *>(operation->source);
|
||||||
set_parity(sign_result_);
|
set_parity(sign_result_);
|
||||||
set_did_compute_flags(); // deliberate fallthrough
|
set_did_compute_flags();
|
||||||
case MicroOp::SetOutFlags:
|
|
||||||
|
|
||||||
|
if(operation_ == 0xdb) {
|
||||||
|
// IN A, (n)
|
||||||
|
memptr_.full = bc_.full + 1;
|
||||||
|
} else {
|
||||||
|
// IN r, (C)
|
||||||
|
// TODO: this surely isn't right?
|
||||||
|
++memptr_.full;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MicroOp::SetOutFlags:
|
||||||
memptr_.full = bc_.full + 1;
|
memptr_.full = bc_.full + 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ void ProcessorStorage::install_default_instruction_set() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProcessorStorage::assemble_ed_page(InstructionPage &target) {
|
void ProcessorStorage::assemble_ed_page(InstructionPage &target) {
|
||||||
#define IN_C(r) StdInstr(Input(bc_, r), {MicroOp::SetInFlags, &r})
|
#define IN_C(r) StdInstr({MicroOp::Move16, &bc_.full, &memptr_.full}, Input(bc_, r), {MicroOp::SetInFlags, &r})
|
||||||
#define OUT_C(r) StdInstr(Output(bc_, r), {MicroOp::SetOutFlags, &r})
|
#define OUT_C(r) StdInstr(Output(bc_, r), {MicroOp::SetOutFlags, &r})
|
||||||
#define IN_OUT(r) IN_C(r), OUT_C(r)
|
#define IN_OUT(r) IN_C(r), OUT_C(r)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user