1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/libsrc/runtime/along.s
cuz 3650422769 New module
git-svn-id: svn://svn.cc65.org/cc65/trunk@1602 b7a2c559-68d2-44c3-8de9-860c34a00d81
2002-11-23 11:19:51 +00:00

25 lines
355 B
ArmAsm

;
; 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