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
This commit is contained in:
@@ -60,7 +60,8 @@ S_OBJS = c_acptr.o \
|
|||||||
scratch.o \
|
scratch.o \
|
||||||
sysremove.o \
|
sysremove.o \
|
||||||
systime.o \
|
systime.o \
|
||||||
where.o \
|
wherex.o \
|
||||||
|
wherey.o \
|
||||||
write.o
|
write.o
|
||||||
|
|
||||||
all: $(C_OBJS) $(S_OBJS)
|
all: $(C_OBJS) $(S_OBJS)
|
||||||
|
|||||||
18
libsrc/cbm/wherex.s
Normal file
18
libsrc/cbm/wherex.s
Normal file
@@ -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
|
||||||
|
|
||||||
@@ -1,27 +1,18 @@
|
|||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 06.08.1998
|
; Ullrich von Bassewitz, 06.08.1998
|
||||||
;
|
;
|
||||||
; unsigned char wherex (void);
|
|
||||||
; unsigned char wherey (void);
|
; unsigned char wherey (void);
|
||||||
|
;
|
||||||
|
|
||||||
|
.export _wherey
|
||||||
.export _wherex, _wherey
|
|
||||||
.import PLOT
|
.import PLOT
|
||||||
|
|
||||||
|
|
||||||
_wherex:
|
.proc _wherey
|
||||||
sec
|
|
||||||
jsr PLOT ; Get cursor position
|
|
||||||
tya
|
|
||||||
rts
|
|
||||||
|
|
||||||
_wherey:
|
|
||||||
sec
|
sec
|
||||||
jsr PLOT ; Get cursor position
|
jsr PLOT ; Get cursor position
|
||||||
txa
|
txa
|
||||||
|
ldx #$00
|
||||||
rts
|
rts
|
||||||
|
.endproc
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user