Add and_eax_imm32(0x25) instruction

This commit is contained in:
tuz358
2018-03-06 11:08:36 +09:00
parent 6df7285495
commit ca0a55eeaf
2 changed files with 9 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ void Instructions::init_instructions(){
this->instructions[0x0b] = &Instructions::or_r32_rm32;
this->instructions[0x21] = &Instructions::and_rm32_r32;
this->instructions[0x23] = &Instructions::and_r32_rm32;
this->instructions[0x25] = &Instructions::and_eax_imm32;
this->instructions[0x31] = &Instructions::xor_rm32_r32;
this->instructions[0x40] = &Instructions::inc_eax;
this->instructions[0x41] = &Instructions::inc_ecx;
@@ -407,6 +408,13 @@ void Instructions::and_r32_rm32(){
}
}
void Instructions::and_eax_imm32(){
this->eip++;
uint32_t imm32 = memory.read_uint32(this->eip);
imm32 = swap_endian32(imm32);
this->registers[0] &= imm32;
}
void Instructions::xor_rm32_r32(){
//printf("xor_rm32_r32 called.\n");
uint32_t addr, dst, imm32;