]> git.sur5r.net Git - cc65/blob - libsrc/runtime/asreax2.s
fsetpos.o fgetpos.o rewind.o fseek.o ftell.o: new object files
[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         ldx     sreg+1
19         cpx     #$80            ; Get bit 7 into carry
20         ror     sreg+1
21         ror     sreg
22         ror     tmp1
23         ror     a
24         ldx     tmp1
25         rts
26