mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Make BSR operate like the other offsets: the flow controller gets whatever was in the opcode.
This commit is contained in:
parent
45e9648b8c
commit
cb77519af8
@ -483,7 +483,7 @@ template <Model model, typename BusHandler>
|
||||
void Executor<model, BusHandler>::State::bsr(uint32_t offset) {
|
||||
sp.l -= 4;
|
||||
write<uint32_t>(sp.l, program_counter.l);
|
||||
program_counter.l = instruction_address + offset;
|
||||
program_counter.l = instruction_address + offset + 2;
|
||||
}
|
||||
|
||||
template <Model model, typename BusHandler>
|
||||
|
@ -268,13 +268,13 @@ template <
|
||||
break;
|
||||
|
||||
case Operation::BSRb:
|
||||
flow_controller.bsr(int8_t(src.b) + 2);
|
||||
flow_controller.bsr(int8_t(src.b));
|
||||
break;
|
||||
case Operation::BSRw:
|
||||
flow_controller.bsr(int16_t(src.w) + 2);
|
||||
flow_controller.bsr(int16_t(src.w));
|
||||
break;
|
||||
case Operation::BSRl:
|
||||
flow_controller.bsr(src.l + 2);
|
||||
flow_controller.bsr(src.l);
|
||||
break;
|
||||
|
||||
case Operation::DBcc: {
|
||||
|
Loading…
Reference in New Issue
Block a user