mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-01-27 00:16:09 +00:00
Introduce an IntelProcessor base class to allow known good implementation to be shared.
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
@@ -17,23 +17,3 @@ void EightBit::Processor::initialise() {
|
||||
sp.word = 0xffff;
|
||||
reset();
|
||||
}
|
||||
|
||||
void EightBit::Processor::push(uint8_t value) {
|
||||
m_memory.ADDRESS().word = --sp.word;
|
||||
m_memory.reference() = value;
|
||||
}
|
||||
|
||||
void EightBit::Processor::pushWord(register16_t value) {
|
||||
push(value.high);
|
||||
push(value.low);
|
||||
}
|
||||
|
||||
uint8_t EightBit::Processor::pop() {
|
||||
m_memory.ADDRESS().word = sp.word++;
|
||||
return m_memory.reference();
|
||||
}
|
||||
|
||||
void EightBit::Processor::popWord(register16_t& output) {
|
||||
output.low = pop();
|
||||
output.high = pop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user