Add jne_imm8(0x75) instruction

This commit is contained in:
tuz358
2018-03-05 11:50:25 +09:00
parent 4b84c23d92
commit 23831ad03b
2 changed files with 12 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ void Instructions::init_instructions(){
this->instructions[0x01] = &Instructions::add_rm32_r32;
this->instructions[0x31] = &Instructions::xor_rm32_r32;
this->instructions[0x49] = &Instructions::dec_ecx;
this->instructions[0x75] = &Instructions::jne_imm8;
this->instructions[0x83] = &Instructions::opcode_83;
this->instructions[0x89] = &Instructions::mov_rm32_r32;
this->instructions[0x90] = &Instructions::nop;
@@ -154,6 +155,16 @@ void Instructions::dec_ecx(){
this->registers[1]--;
}
void Instructions::jne_imm8(){
printf("jne_imm8 called.\n");
this->eip++;
imm8 = memory.read_uint8(this->eip);
int zero_flag = this->get_flag(ZF);
if (!zero_flag) this->eip += imm8;
}
void Instructions::opcode_83(){
printf("opcode_83 called.\n");