6502-emulator/src/memory.h

26 lines
469 B
C
Raw Normal View History

2019-03-27 00:14:44 +00:00
#ifndef INC_6502_EMULATOR_MEMORY_H
#define INC_6502_EMULATOR_MEMORY_H
2019-03-27 20:04:01 +00:00
#include "stack.h"
2019-03-27 00:14:44 +00:00
#include <memory>
#include <vector>
using namespace std;
class Memory {
public:
explicit Memory();
2019-03-27 20:04:01 +00:00
void set_byte_at(uint16_t index, uint8_t value);
2019-03-27 00:14:44 +00:00
uint8_t get_byte_at(uint16_t index);
2019-03-27 20:04:01 +00:00
void stack_push(uint8_t data);
uint8_t stack_pop();
2019-03-27 00:14:44 +00:00
private:
2019-03-27 20:04:01 +00:00
unique_ptr<vector<uint8_t>> bytes;
unique_ptr<Stack> stack;
2019-03-27 00:14:44 +00:00
};
#endif //INC_6502_EMULATOR_MEMORY_H