ft: partially implement Group 5 instructions

This commit is contained in:
2025-05-14 13:41:08 +09:00
parent 4fa789e6bb
commit 1f88db75f5
2 changed files with 17 additions and 1 deletions

View File

@@ -613,7 +613,20 @@ impl Disassembler {
_ => panic!("Illegal Group 4 mnemonic"),
}
}
0xFF => todo!("Group 5"),
0xFF => {
let (target, reg) = self.parse_modrm_byte(Operand::Word(0));
match reg {
0b000 => Mnemonic::INC_Mod(target),
0b001 => Mnemonic::DEC_Mod(target),
0b010 => Mnemonic::CALL_Mod(target),
0b011 => todo!("Implement CALL Mp"),
0b100 => Mnemonic::JMP_Mod(target),
0b101 => todo!("Implement JMP Mp"),
0b110 => Mnemonic::PUSH_Mod(target),
// 0b111 => unused
_ => panic!("Illegal Group 5 mnemonic"),
}
}
_ => {
eprintln!("Encountered unknown instruction '0x{:x}'", opcode);