Skip to content

Commit

Permalink
Correctly terminate the game cleanly on death/quit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
skx committed Apr 1, 2024
1 parent 8480360 commit 8989f69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game.z80
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8989f69

Please sign in to comment.