diff --git a/emulator/components/Register.cpp b/emulator/components/Register.cpp new file mode 100644 index 0000000..d80c76a --- /dev/null +++ b/emulator/components/Register.cpp @@ -0,0 +1,21 @@ +// +// Created by black on 12.06.25. +// + +#include "Register.h" + + +Register* Register::getInstance() { + if (m_instance == nullptr) { + m_instance = new Register(); + } else { + m_instance = new Register(); + } + return m_instance; +} + +void Register::setRegister() { +} + +int Register::getRegister(int r) { +} diff --git a/emulator/components/Register.h b/emulator/components/Register.h new file mode 100644 index 0000000..d8fa141 --- /dev/null +++ b/emulator/components/Register.h @@ -0,0 +1,30 @@ +// +// Created by black on 12.06.25. +// + +#ifndef REGISTER_H +#define REGISTER_H + + + +class Register { + +private: + Register() = default; + + static Register *m_instance; + +public: + static Register* getInstance(); + + void setRegister(); + + int getRegister(int r); + +}; + +Register *Register::m_instance = nullptr; + + + +#endif //REGISTER_H