mirror of
https://github.com/TomHarte/CLK.git
synced 2025-04-21 02:37:44 +00:00
Restrict shift operand size, causing text output at last.
This commit is contained in:
parent
88ed49a833
commit
7c7675179e
@ -791,6 +791,11 @@ std::pair<int, typename Decoder<model>::InstructionT> Decoder<model>::decode(
|
||||
case ModRegRMFormat::MemRegROL_to_SAR:
|
||||
destination_ = memreg;
|
||||
|
||||
// TODO: is this true? It appears empirically to be so from the PC AT BIOS, but find a source.
|
||||
if(operand_size_ != DataSize::None) {
|
||||
operand_size_ = DataSize::Byte;
|
||||
}
|
||||
|
||||
switch(reg) {
|
||||
default:
|
||||
if constexpr (model == Model::i8086) {
|
||||
|
@ -25,12 +25,12 @@ struct Descriptor {
|
||||
Descriptor() = default;
|
||||
|
||||
Descriptor(const uint16_t descriptor[4]) noexcept {
|
||||
printf("%04x %04x %04x %04x", descriptor[0], descriptor[1], descriptor[2], descriptor[3]);
|
||||
// printf("%04x %04x %04x %04x", descriptor[0], descriptor[1], descriptor[2], descriptor[3]);
|
||||
|
||||
base_ = uint32_t(descriptor[1] | ((descriptor[2] & 0xff) << 16));
|
||||
limit_ = descriptor[0];
|
||||
|
||||
printf(" -> %04x -> +%04x\n", base_, limit_);
|
||||
// printf(" -> %04x -> +%04x\n", base_, limit_);
|
||||
|
||||
present_ = descriptor[2] & 0x8000;
|
||||
privilege_level_ = (descriptor[2] >> 13) & 3;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
memory_.template access<uint16_t, AccessType::Read>(table_address + 6, table_end)
|
||||
};
|
||||
|
||||
printf("%s [%04x -> %08x]: ", InstructionSet::x86::to_string(segment, InstructionSet::x86::DataSize::Word).c_str(), value, table_address);
|
||||
// printf("%s [%04x -> %08x]: ", InstructionSet::x86::to_string(segment, InstructionSet::x86::DataSize::Word).c_str(), value, table_address);
|
||||
const Descriptor incoming(entry);
|
||||
|
||||
// switch(segment) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user