Whoops: correct 6809 stack pointer increment/decrement order

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2018-09-29 10:02:53 +01:00
parent 861fc28bba
commit f6bd871757

View File

@ -579,11 +579,11 @@ void EightBit::mc6809::execute11(const uint8_t opcode) {
//
void EightBit::mc6809::push(register16_t& stack, const uint8_t value) {
BUS().write(stack--, value);
BUS().write(--stack, value);
}
uint8_t EightBit::mc6809::pop(register16_t& stack) {
return BUS().read(++stack);
return BUS().read(stack++);
}
//