added "lw" and "sw"
This commit is contained in:
@@ -10,22 +10,25 @@
|
||||
/// Als Hauptspeicher wird ein Array genutzt.
|
||||
|
||||
|
||||
|
||||
class Memory {
|
||||
private:
|
||||
Memory() = default;
|
||||
Memory();
|
||||
|
||||
/// Singleton instance
|
||||
static Memory *m_instance;
|
||||
/// Hauptspeicher (hier 32 kB groß)
|
||||
std::array<int, 8192> m_memory;
|
||||
std::array<int, 8192> m_memory{};
|
||||
|
||||
public:
|
||||
/// Singleton Logik
|
||||
Memory(const Memory &) = delete;
|
||||
|
||||
Memory(const Memory &&) = delete;
|
||||
|
||||
Memory &operator=(const Memory &) = delete;
|
||||
|
||||
Memory &operator=(const Memory &&) = delete;
|
||||
|
||||
~Memory() = default;
|
||||
|
||||
/**
|
||||
@@ -49,9 +52,7 @@ public:
|
||||
* @return Der Wert aus der Adresse
|
||||
*/
|
||||
int load(int address) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //MEMORY_H
|
||||
|
||||
Reference in New Issue
Block a user