ft: decode last set of instructions
This commit is contained in:
@@ -586,8 +586,15 @@ impl Disassembler {
|
|||||||
|
|
||||||
0xC8..=0xC9 => return Err(DisasmError::OpcodeUndefined(opcode)),
|
0xC8..=0xC9 => return Err(DisasmError::OpcodeUndefined(opcode)),
|
||||||
|
|
||||||
|
0xCA => Mnemonic::RETF_Iw(self.parse_word()),
|
||||||
|
0xCB => Mnemonic::RETF,
|
||||||
|
|
||||||
|
0xCC => Mnemonic::INT(3),
|
||||||
0xCD => Mnemonic::INT(self.parse_byte()),
|
0xCD => Mnemonic::INT(self.parse_byte()),
|
||||||
|
|
||||||
|
0xCE => Mnemonic::INTO,
|
||||||
|
0xCF => Mnemonic::IRET,
|
||||||
|
|
||||||
// Group 2
|
// Group 2
|
||||||
0xD0 => {
|
0xD0 => {
|
||||||
let (target, reg) = self.parse_modrm_byte(Operand::Byte(0));
|
let (target, reg) = self.parse_modrm_byte(Operand::Byte(0));
|
||||||
@@ -606,6 +613,15 @@ impl Disassembler {
|
|||||||
Self::modrm_reg_to_grp2_cl(reg, target)
|
Self::modrm_reg_to_grp2_cl(reg, target)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0xD4 => Mnemonic::AAM(self.parse_byte()),
|
||||||
|
0xD5 => Mnemonic::AAD(self.parse_byte()),
|
||||||
|
|
||||||
|
0xD6 => return Err(DisasmError::OpcodeUndefined(opcode)),
|
||||||
|
|
||||||
|
0xD7 => Mnemonic::XLAT,
|
||||||
|
|
||||||
|
0xD8..=0xDF => return Err(DisasmError::OpcodeUndefined(opcode)),
|
||||||
|
|
||||||
0xE0 => Mnemonic::LOOPNZ(self.parse_byte() as IByte),
|
0xE0 => Mnemonic::LOOPNZ(self.parse_byte() as IByte),
|
||||||
0xE1 => Mnemonic::LOOPZ(self.parse_byte() as IByte),
|
0xE1 => Mnemonic::LOOPZ(self.parse_byte() as IByte),
|
||||||
0xE2 => Mnemonic::LOOP(self.parse_byte() as IByte),
|
0xE2 => Mnemonic::LOOP(self.parse_byte() as IByte),
|
||||||
@@ -631,11 +647,15 @@ impl Disassembler {
|
|||||||
0xEE => Mnemonic::OUT_ALDX,
|
0xEE => Mnemonic::OUT_ALDX,
|
||||||
0xEF => Mnemonic::OUT_AXDX,
|
0xEF => Mnemonic::OUT_AXDX,
|
||||||
|
|
||||||
|
0xF1 => return Err(DisasmError::OpcodeUndefined(opcode)),
|
||||||
|
|
||||||
0xF2 => Mnemonic::REPNZ,
|
0xF2 => Mnemonic::REPNZ,
|
||||||
0xF3 => Mnemonic::REPZ,
|
0xF3 => Mnemonic::REPZ,
|
||||||
|
|
||||||
0xF4 => Mnemonic::HLT,
|
0xF4 => Mnemonic::HLT,
|
||||||
|
|
||||||
|
0xF5 => Mnemonic::CMC,
|
||||||
|
|
||||||
// Group 3
|
// Group 3
|
||||||
0xF6 => {
|
0xF6 => {
|
||||||
let (target, reg) = self.parse_modrm_byte(Operand::Word(0));
|
let (target, reg) = self.parse_modrm_byte(Operand::Word(0));
|
||||||
|
|||||||
@@ -259,6 +259,9 @@ pub enum Mnemonic {
|
|||||||
// RET
|
// RET
|
||||||
RETIw(Word),
|
RETIw(Word),
|
||||||
RET,
|
RET,
|
||||||
|
RETF_Iw(Word),
|
||||||
|
RETF,
|
||||||
|
IRET,
|
||||||
// Load ES/DS Register
|
// Load ES/DS Register
|
||||||
LES(ModRmTarget),
|
LES(ModRmTarget),
|
||||||
LDS(ModRmTarget),
|
LDS(ModRmTarget),
|
||||||
@@ -301,6 +304,7 @@ pub enum Mnemonic {
|
|||||||
OUT_AXDX,
|
OUT_AXDX,
|
||||||
// INT
|
// INT
|
||||||
INT(Byte),
|
INT(Byte),
|
||||||
|
INTO,
|
||||||
// Flag Manipulation
|
// Flag Manipulation
|
||||||
CLC,
|
CLC,
|
||||||
STC,
|
STC,
|
||||||
@@ -308,9 +312,15 @@ pub enum Mnemonic {
|
|||||||
STI,
|
STI,
|
||||||
CLD,
|
CLD,
|
||||||
STD,
|
STD,
|
||||||
|
CMC,
|
||||||
// Repeat prefix
|
// Repeat prefix
|
||||||
REPNZ,
|
REPNZ,
|
||||||
REPZ,
|
REPZ,
|
||||||
|
// Adjust
|
||||||
|
AAM(Byte),
|
||||||
|
AAD(Byte),
|
||||||
|
// MISC
|
||||||
|
XLAT,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fmt::Display for Mnemonic {
|
impl fmt::Display for Mnemonic {
|
||||||
|
|||||||
Reference in New Issue
Block a user