Splitted the lconvert module into three smaller ones to allow for smaller
executables if not all functions are used. git-svn-id: svn://svn.cc65.org/cc65/trunk@392 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
26
libsrc/runtime/axlong.s
Normal file
26
libsrc/runtime/axlong.s
Normal file
@@ -0,0 +1,26 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 25.10.2000
|
||||
;
|
||||
; CC65 runtime: Convert int in ax into a long
|
||||
;
|
||||
|
||||
.export axulong, axlong
|
||||
.importzp sreg
|
||||
|
||||
; Convert AX from int to long in EAX
|
||||
|
||||
axulong:
|
||||
ldy #0
|
||||
sty sreg
|
||||
sty sreg+1
|
||||
rts
|
||||
|
||||
axlong: cpx #$80 ; Positive?
|
||||
bcc axulong ; Yes, handle like unsigned type
|
||||
ldy #$ff
|
||||
sty sreg
|
||||
sty sreg+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user