mirror of
https://github.com/tdinucci/6502-emulator.git
synced 2024-09-27 13:55:49 +00:00
31 lines
551 B
C++
31 lines
551 B
C++
#ifndef INC_6502_EMULATOR_STACK_H
|
|
#define INC_6502_EMULATOR_STACK_H
|
|
|
|
#include <memory>
|
|
#include "memory.h"
|
|
#include "register.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace emu_6502 {
|
|
class Stack {
|
|
private:
|
|
Memory& memory;
|
|
Register<uint8_t>& sp;
|
|
|
|
public:
|
|
const uint8_t PAGE = 1;
|
|
|
|
Stack(Memory& memory, Register<uint8_t>& sp);
|
|
|
|
Stack(const Stack&) = delete;
|
|
Stack& operator=(const Stack&) = delete;
|
|
|
|
void push(uint8_t value);
|
|
uint8_t pop();
|
|
};
|
|
}
|
|
|
|
|
|
#endif //INC_6502_EMULATOR_STACK_H
|