From 0b1e6b81c4607f049df858e68e1362c776cb1c95 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 23 Aug 2021 13:45:36 +0300 Subject: [PATCH] Minor tweaks * Call `show_msg` rather than invoking the BIOS directly. * Avoid the use of inline push/pop pairs, and use our PUSH_ALL macro --- game.z80 | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/game.z80 b/game.z80 index cb53c83..6829065 100644 --- a/game.z80 +++ b/game.z80 @@ -154,8 +154,7 @@ ENDIF ; Present the game intro-text. ld de, usage_message - ld c, BDOS_OUTPUT_STRING - call BDOS_ENTRY_POINT + call show_msg ; Pause for input here. ld c,BDOS_CHARACTER_READ @@ -214,8 +213,7 @@ not_dead: not_won: ; 3. show the prompt ld de, prompt_message - ld c, BDOS_OUTPUT_STRING - call BDOS_ENTRY_POINT + call show_msg ; 4. Erase our input buffer. ld hl, INPUT_BUFFER+2 @@ -1542,8 +1540,8 @@ help_func_loop: ; copy the command-name to the buffer jr z, help_skip_this call show_tab ld de, TMP_BUFFER - ld c, BDOS_OUTPUT_STRING - call BDOS_ENTRY_POINT + call show_msg + help_skip_this: pop de inc de ; skip hidden-flag @@ -2017,17 +2015,10 @@ show_newline: jp show_msg show_tab: - push af - push bc - push de - push hl + PUSH_ALL ld de, TAB - ld c, BDOS_OUTPUT_STRING - call BDOS_ENTRY_POINT - pop hl - pop de - pop bc - pop af + call show_msg + POP_ALL ret