From f6bd87175733fb9db71b213d59ee4cf72dc69842 Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Sat, 29 Sep 2018 10:02:53 +0100 Subject: [PATCH] Whoops: correct 6809 stack pointer increment/decrement order Signed-off-by: Adrian Conlon --- MC6809/src/mc6809.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MC6809/src/mc6809.cpp b/MC6809/src/mc6809.cpp index de8b8cd..afd6c2c 100644 --- a/MC6809/src/mc6809.cpp +++ b/MC6809/src/mc6809.cpp @@ -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++); } //