]> git.sur5r.net Git - cc65/blob - libsrc/runtime/axlong.s
Removed superfluous final linefeed.
[cc65] / libsrc / runtime / axlong.s
1 ;
2 ; Ullrich von Bassewitz, 25.10.2000
3 ; Christian Krueger, 02-Mar-2017, some bytes saved
4 ;
5 ; CC65 runtime: Convert int in ax into a long
6 ;
7
8         .export         axulong, axlong
9         .importzp       sreg
10
11 ; Convert AX from int to long in EAX
12
13 axlong: ldy     #$ff
14         cpx     #$80            ; Positive?
15         bcs     store           ; No, apply $FF
16
17 axulong:
18         ldy     #0
19 store:  sty     sreg
20         sty     sreg+1
21         rts