mirror of
https://github.com/tuz358/cpu-emulator.git
synced 2025-12-18 21:14:35 +03:00
instructions.h: include memory.h
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "include/instructions.h"
|
||||
|
||||
void Instructions::init(uint32_t eip, uint32_t esp){
|
||||
void Instructions::init(uint32_t eip, uint32_t esp, Memory memory){
|
||||
// initialize general purpose registers
|
||||
memset(this->registers, 0, sizeof(this->registers));
|
||||
this->registers[4] = esp;
|
||||
@@ -11,6 +11,8 @@ void Instructions::init(uint32_t eip, uint32_t esp){
|
||||
// initialize instruction pointer
|
||||
this->eip = eip;
|
||||
|
||||
this->memory = memory;
|
||||
|
||||
this->init_instructions();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user