1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Ensure shoutouts upon LDS, LES and any far jump/call/int.

This commit is contained in:
Thomas Harte 2023-11-10 22:58:59 -05:00
parent 19a61f867f
commit 3a782faaf3
2 changed files with 9 additions and 2 deletions

View File

@ -246,10 +246,16 @@ template <
case Operation::LAHF: Primitive::lahf(context.registers.ah(), context); return;
case Operation::LDS:
if constexpr (data_size == DataSize::Word) Primitive::ld<Source::DS>(instruction, destination_w(), context);
if constexpr (data_size == DataSize::Word) {
Primitive::ld<Source::DS>(instruction, destination_w(), context);
context.registers.did_update(Source::DS);
}
return;
case Operation::LES:
if constexpr (data_size == DataSize::Word) Primitive::ld<Source::ES>(instruction, destination_w(), context);
if constexpr (data_size == DataSize::Word) {
Primitive::ld<Source::ES>(instruction, destination_w(), context);
context.registers.did_update(Source::ES);
}
return;
case Operation::LEA: Primitive::lea<IntT>(instruction, destination_w(), context); return;

View File

@ -348,6 +348,7 @@ class FlowController {
void jump(uint16_t segment, uint16_t address) {
registers_.cs_ = segment;
registers_.did_update(Registers::Source::CS);
registers_.ip_ = address;
}