1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-16 11:30:22 +00:00

Adds direct indirect.

This commit is contained in:
Thomas Harte 2020-10-04 22:11:41 -04:00
parent 9a05c68ce7
commit 825201f4f2

View File

@ -205,14 +205,21 @@ template <typename BusHandler> void Processor<BusHandler>::run_for(const Cycles
break; break;
case OperationConstructDirect: case OperationConstructDirect:
data_address_ = direct_ + instruction_buffer_.value; data_address_ = (direct_ + instruction_buffer_.value) & 0xffff;
if(!(direct_&0xff)) { if(!(direct_&0xff)) {
++next_op_; ++next_op_;
} }
break; break;
case OperationConstructDirectIndexedIndirect: case OperationConstructDirectIndexedIndirect:
data_address_ = direct_ + x() + instruction_buffer_.value; data_address_ = data_bank_ + (direct_ + x() + instruction_buffer_.value) & 0xffff;
if(!(direct_&0xff)) {
++next_op_;
}
break;
case OperationConstructDirectIndirect:
data_address_ = data_bank_ + (direct_ + instruction_buffer_.value) & 0xffff;
if(!(direct_&0xff)) { if(!(direct_&0xff)) {
++next_op_; ++next_op_;
} }