mirror of
https://github.com/tuz358/cpu-emulator.git
synced 2025-12-18 21:14:35 +03:00
Add dec_ecx(0x49) instruction
This commit is contained in:
@@ -22,6 +22,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[0x89] = &Instructions::mov_rm32_r32;
|
||||
this->instructions[0x90] = &Instructions::nop;
|
||||
this->instructions[0xb9] = &Instructions::mov_ecx_imm32;
|
||||
@@ -146,6 +147,11 @@ void Instructions::xor_rm32_r32(){
|
||||
}
|
||||
}
|
||||
|
||||
void Instructions::dec_ecx(){
|
||||
printf("dec_ecx called.\n");
|
||||
this->registers[1]--;
|
||||
}
|
||||
|
||||
void Instructions::mov_rm32_r32(){
|
||||
printf("mov_rm32_r32 called.\n");
|
||||
uint32_t addr, imm32;
|
||||
|
||||
Reference in New Issue
Block a user