From eedb858a9f384ccccd5b1c0860f55d2ef788966d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 19 Apr 2021 17:40:57 -0400 Subject: Save 4 bytes --- console.s | 19 +------------------ textdecomp.s | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/console.s b/console.s index 1431ff8..99b264e 100644 --- a/console.s +++ b/console.s @@ -11,7 +11,7 @@ .export _gotox0y22, _gotox0y3, _gotox0y, _gotox0y3_clrtoeol .export _cputc0, _set_orders, _pluralize, _print_combat_msg .export _rvs_on, _rvs_off - .export _prepare_report, _clear_msg_window, _print_item, _print_location + .export _prepare_report, _clear_msg_window .importzp tmp3 ; ditto .import _revflag ; conio/revers.s @@ -21,7 +21,6 @@ .import _cprintulong, _cputc, _cprint_taipan, _timed_getch, _orders .import _turbo .import _print_msg, _cspaces - .import _item, _location .ifdef CART_TARGET .segment "HIGHCODE" @@ -264,22 +263,6 @@ _print_combat_msg: jsr _print_msg jmp _clrtoeol -; extern void __fastcall__ print_location(char loc) -_print_location: - asl - tay - lda _location,y - ldx _location+1,y - jmp _print_msg - -; extern void __fastcall__ print_item(char item) -_print_item: - asl - tay - lda _item,y - ldx _item+1,y - jmp _print_msg - ; extern void clear_msg_window(void) ; extern void prepare_report(void) _clear_msg_window: diff --git a/textdecomp.s b/textdecomp.s index 403507c..03660ae 100644 --- a/textdecomp.s +++ b/textdecomp.s @@ -11,7 +11,11 @@ ; See textcomp.c for details of encoded format. .include "atari.inc" + .export _print_msg + .export _print_item, _print_location + + .import _item, _location .import _cputc srcptr = FR1 @@ -180,6 +184,21 @@ table: ; outsnac values 53..63 .code .endif +; extern void __fastcall__ print_location(char loc) +_print_location: + asl + tay + lda _location,y + ldx _location+1,y + bne _print_msg ; branch always (location is never $00xx) + +; extern void __fastcall__ print_item(char item) +_print_item: + asl + tay + lda _item,y + ldx _item+1,y ; fall thru + _print_msg: sta srcptr stx srcptr+1 -- cgit v1.2.3