mirror of
https://github.com/TomHarte/CLK.git
synced 2025-10-25 09:27:01 +00:00
Make BSR operate like the other offsets: the flow controller gets whatever was in the opcode.
This commit is contained in:
@@ -483,7 +483,7 @@ template <Model model, typename BusHandler>
|
|||||||
void Executor<model, BusHandler>::State::bsr(uint32_t offset) {
|
void Executor<model, BusHandler>::State::bsr(uint32_t offset) {
|
||||||
sp.l -= 4;
|
sp.l -= 4;
|
||||||
write<uint32_t>(sp.l, program_counter.l);
|
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>
|
template <Model model, typename BusHandler>
|
||||||
|
|||||||
@@ -268,13 +268,13 @@ template <
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Operation::BSRb:
|
case Operation::BSRb:
|
||||||
flow_controller.bsr(int8_t(src.b) + 2);
|
flow_controller.bsr(int8_t(src.b));
|
||||||
break;
|
break;
|
||||||
case Operation::BSRw:
|
case Operation::BSRw:
|
||||||
flow_controller.bsr(int16_t(src.w) + 2);
|
flow_controller.bsr(int16_t(src.w));
|
||||||
break;
|
break;
|
||||||
case Operation::BSRl:
|
case Operation::BSRl:
|
||||||
flow_controller.bsr(src.l + 2);
|
flow_controller.bsr(src.l);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Operation::DBcc: {
|
case Operation::DBcc: {
|
||||||
|
|||||||
Reference in New Issue
Block a user