mirror of
https://github.com/tuz358/cpu-emulator.git
synced 2025-12-18 21:14:35 +03:00
Add jne_imm8(0x75) instruction
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user