mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Fix immediate byte and word fetches.
This commit is contained in:
@@ -111,8 +111,17 @@ typename Executor<model, BusHandler>::EffectiveAddress Executor<model, BusHandle
|
|||||||
ea.requires_fetch = false;
|
ea.requires_fetch = false;
|
||||||
break;
|
break;
|
||||||
case AddressingMode::ImmediateData:
|
case AddressingMode::ImmediateData:
|
||||||
read(instruction.size(), program_counter_.l, ea.value);
|
switch(instruction.size()) {
|
||||||
program_counter_.l += (instruction.size() == DataSize::LongWord) ? 4 : 2;
|
case DataSize::Byte:
|
||||||
|
ea.value.l = read_pc<uint16_t>() & 0xff;
|
||||||
|
break;
|
||||||
|
case DataSize::Word:
|
||||||
|
ea.value.l = read_pc<uint16_t>();
|
||||||
|
break;
|
||||||
|
case DataSize::LongWord:
|
||||||
|
ea.value.l = read_pc<uint32_t>();
|
||||||
|
break;
|
||||||
|
}
|
||||||
ea.requires_fetch = false;
|
ea.requires_fetch = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user