New module
git-svn-id: svn://svn.cc65.org/cc65/trunk@1602 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
OBJS = add.o \
|
OBJS = add.o \
|
||||||
addeqsp.o \
|
addeqsp.o \
|
||||||
addysp.o \
|
addysp.o \
|
||||||
|
along.o \
|
||||||
and.o \
|
and.o \
|
||||||
aslax1.o \
|
aslax1.o \
|
||||||
aslax2.o \
|
aslax2.o \
|
||||||
|
|||||||
24
libsrc/runtime/along.s
Normal file
24
libsrc/runtime/along.s
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
;
|
||||||
|
; Ullrich von Bassewitz, 23.11.2002
|
||||||
|
;
|
||||||
|
; CC65 runtime: Convert char in ax into a long
|
||||||
|
;
|
||||||
|
|
||||||
|
.export aulong, along
|
||||||
|
.importzp sreg
|
||||||
|
|
||||||
|
; Convert A from char to long in EAX
|
||||||
|
|
||||||
|
aulong: ldx #0
|
||||||
|
stx sreg
|
||||||
|
stx sreg+1
|
||||||
|
rts
|
||||||
|
|
||||||
|
along: cmp #$80 ; Positive?
|
||||||
|
bcc aulong ; Yes, handle like unsigned type
|
||||||
|
ldx #$ff
|
||||||
|
stx sreg
|
||||||
|
stx sreg+1
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user