initial memory implementation

This commit is contained in:
black
2025-06-12 15:56:16 +03:00
parent 39b9d1bf54
commit 9a1c44a7ee
2 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// Created by black on 12.06.25.
//
#include "Memory.h"
Memory *Memory::getInstance() {
static Memory instance;
return &instance;
}
void Memory::store(const int address, const int value) {
m_memory[address] = value;
}
int Memory::load(const int address) const {
return m_memory[address];
}