From c072027b87af83ac135b42e240982ff7fc4b939e Mon Sep 17 00:00:00 2001 From: b1ackmai1er Date: Tue, 20 Dec 2022 17:19:12 +0800 Subject: [PATCH] Preserve registers --- Source/Apps/Tune/printing.inc | 2 ++ Source/Apps/VGM/printing.inc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Source/Apps/Tune/printing.inc b/Source/Apps/Tune/printing.inc index 6d118ea2..be1ade84 100644 --- a/Source/Apps/Tune/printing.inc +++ b/Source/Apps/Tune/printing.inc @@ -34,6 +34,7 @@ PRTCR: ; Print a zero terminated string at (DE) without destroying any registers ; PRTSTR: + PUSH AF PUSH DE ; PRTSTR1: @@ -46,6 +47,7 @@ PRTSTR1: ; PRTSTR2: POP DE ; restore registers + POP AF RET ; ; Print the value in A in hex without destroying any registers diff --git a/Source/Apps/VGM/printing.inc b/Source/Apps/VGM/printing.inc index 6d118ea2..be1ade84 100644 --- a/Source/Apps/VGM/printing.inc +++ b/Source/Apps/VGM/printing.inc @@ -34,6 +34,7 @@ PRTCR: ; Print a zero terminated string at (DE) without destroying any registers ; PRTSTR: + PUSH AF PUSH DE ; PRTSTR1: @@ -46,6 +47,7 @@ PRTSTR1: ; PRTSTR2: POP DE ; restore registers + POP AF RET ; ; Print the value in A in hex without destroying any registers