]> git.sur5r.net Git - cc65/blob - libsrc/runtime/asreax2.s
cfg/atari-xex.cfg: fix typo in comment
[cc65] / libsrc / runtime / asreax2.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; CC65 runtime: Scale the 32 bit primary register by 4
5 ;
6
7         .export         asreax2
8         .importzp       sreg, tmp1
9
10 asreax2:
11         stx     tmp1
12         ldx     sreg+1
13         cpx     #$80            ; Get bit 7 into carry
14         ror     sreg+1
15         ror     sreg
16         ror     tmp1
17         ror     a
18         cpx     #$80            ; Get bit 7 into carry
19         ror     sreg+1
20         ror     sreg
21         ror     tmp1
22         ror     a
23         ldx     tmp1
24         rts
25