mirror of
https://github.com/cc65/cc65.git
synced 2024-11-18 00:07:21 +00:00
25 lines
460 B
ArmAsm
25 lines
460 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
|
|
|
|
|