From 38dcb86552cde16644079f0a632971c8644a6957 Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 1 Jan 2003 21:33:49 +0000 Subject: [PATCH] Fixed int promotion problem in wherex and wherey. Moved wherex and wherey into separate modules. git-svn-id: svn://svn.cc65.org/cc65/trunk@1867 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/cbm/Makefile | 3 ++- libsrc/cbm/wherex.s | 18 ++++++++++++++++++ libsrc/cbm/{where.s => wherey.s} | 19 +++++-------------- 3 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 libsrc/cbm/wherex.s rename libsrc/cbm/{where.s => wherey.s} (53%) diff --git a/libsrc/cbm/Makefile b/libsrc/cbm/Makefile index c8643855c..d3095640b 100644 --- a/libsrc/cbm/Makefile +++ b/libsrc/cbm/Makefile @@ -60,7 +60,8 @@ S_OBJS = c_acptr.o \ scratch.o \ sysremove.o \ systime.o \ - where.o \ + wherex.o \ + wherey.o \ write.o all: $(C_OBJS) $(S_OBJS) diff --git a/libsrc/cbm/wherex.s b/libsrc/cbm/wherex.s new file mode 100644 index 000000000..c7076ad84 --- /dev/null +++ b/libsrc/cbm/wherex.s @@ -0,0 +1,18 @@ +; +; Ullrich von Bassewitz, 06.08.1998 +; +; unsigned char wherex (void); +; + + .export _wherex + .import PLOT + + +.proc _wherex + sec + jsr PLOT ; Get cursor position + tya + ldx #$00 + rts +.endproc + diff --git a/libsrc/cbm/where.s b/libsrc/cbm/wherey.s similarity index 53% rename from libsrc/cbm/where.s rename to libsrc/cbm/wherey.s index a7bf17d3e..869be4baf 100644 --- a/libsrc/cbm/where.s +++ b/libsrc/cbm/wherey.s @@ -1,27 +1,18 @@ ; ; Ullrich von Bassewitz, 06.08.1998 ; -; unsigned char wherex (void); ; unsigned char wherey (void); +; - - .export _wherex, _wherey + .export _wherey .import PLOT -_wherex: - sec - jsr PLOT ; Get cursor position - tya - rts - -_wherey: +.proc _wherey sec jsr PLOT ; Get cursor position txa + ldx #$00 rts - - - - +.endproc