]> git.sur5r.net Git - cc65/blob - libsrc/runtime/asrax4.s
Fixed a bug
[cc65] / libsrc / runtime / asrax4.s
1 ;
2 ; Ullrich von Bassewitz, 25.07.2001
3 ;
4 ; CC65 runtime: Scale the primary register by 16
5 ;
6
7         .export         asrax4
8         .importzp       tmp1
9
10 asrax4: stx     tmp1
11         cpx     #$80            ; Put bit 7 into carry
12         ror     tmp1
13         ror     a
14         ldx     tmp1
15         cpx     #$80
16         ror     tmp1
17         ror     a
18         ldx     tmp1
19         cpx     #$80
20         ror     tmp1
21         ror     a
22         ldx     tmp1
23         cpx     #$80
24         ror     tmp1
25         ror     a
26         ldx     tmp1
27         rts
28