ft: implement CALL and JMP instructions
This commit is contained in:
@@ -463,7 +463,7 @@ impl Disassembler {
|
||||
0x98 => Mnemonic::CBW,
|
||||
0x99 => Mnemonic::CWD,
|
||||
|
||||
0x9A => Mnemonic::CALL(Pointer {
|
||||
0x9A => Mnemonic::CALL_p(Pointer {
|
||||
segment: self.parse_word(),
|
||||
offset: self.parse_word(),
|
||||
}),
|
||||
@@ -523,6 +523,17 @@ impl Disassembler {
|
||||
|
||||
0xCD => Mnemonic::INT(self.parse_byte()),
|
||||
|
||||
0xE8 => Mnemonic::CALL_v(self.parse_word()),
|
||||
|
||||
0xE9 => Mnemonic::JMP_v(self.parse_word()),
|
||||
0xEA => Mnemonic::JMP_p(Pointer {
|
||||
segment: self.parse_word(),
|
||||
offset: self.parse_word(),
|
||||
}),
|
||||
0xEB => Mnemonic::JMP_b(self.parse_byte()),
|
||||
|
||||
0xF4 => Mnemonic::HLT,
|
||||
|
||||
// Group 3
|
||||
0xF6 => {
|
||||
let (target, reg) = self.parse_modrm_byte(Operand::Word(0));
|
||||
|
||||
@@ -199,7 +199,12 @@ pub enum Mnemonic {
|
||||
CBW,
|
||||
CWD,
|
||||
// CALL
|
||||
CALL(Pointer),
|
||||
CALL_p(Pointer),
|
||||
CALL_v(Word),
|
||||
// JUMP
|
||||
JMP_p(Pointer),
|
||||
JMP_b(Byte),
|
||||
JMP_v(Word),
|
||||
// WAIT
|
||||
WAIT,
|
||||
// Push/Pop Flags
|
||||
@@ -234,6 +239,8 @@ pub enum Mnemonic {
|
||||
// DIV
|
||||
DIV(ModRmTarget),
|
||||
IDIV(ModRmTarget),
|
||||
// HALT
|
||||
HLT,
|
||||
// INT
|
||||
INT(Byte),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user