From 8989f6925308346c1a0b73999464f0215517f0cb Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 1 Apr 2024 12:53:04 +0300 Subject: [PATCH] Correctly terminate the game cleanly on death/quit Previously the code would print some random gibberish and exit in an unclean fashion after the user declined the opportunity to play again. looking at this closely it was because I used the wrong offset of the "quitting" message to print - so random binary junk would get displayed before a $ character was encountered by chance, and terminated the display. Correctly point to the "terminating" message, and exit cleanly to BASIC/CP/M. --- game.z80 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/game.z80 b/game.z80 index 705ca13..ba16050 100644 --- a/game.z80 +++ b/game.z80 @@ -668,9 +668,10 @@ play_again_yes: ; User chose "N" to "play again?" play_again_no: - ld de, play_again_no + ld de, play_again_no_msg call bios_output_string IF SPECTRUM + pop de ret ELSE ld c, 0x0