jne_imm8: Bug fix due toeip addressing mistakes

This commit is contained in:
tuz358
2018-03-05 16:56:15 +09:00
parent f8f103b815
commit 997d62dbe6

View File

@@ -161,11 +161,13 @@ void Instructions::dec_ecx(){
void Instructions::jne_imm8(){ void Instructions::jne_imm8(){
printf("jne_imm8 called.\n"); printf("jne_imm8 called.\n");
this->eip++; int8_t imm8 = memory.read_int8(this->eip);
uint8_t imm8 = memory.read_uint8(this->eip);
int zero_flag = this->get_flag(ZF); int zero_flag = this->get_flag(ZF);
if (!zero_flag) this->eip += imm8; if (!zero_flag){
this->eip += imm8;
}
this->eip++;
} }
void Instructions::opcode_83(){ void Instructions::opcode_83(){