]> git.sur5r.net Git - cc65/blob - libsrc/runtime/asreax3.s
lseek: Return EINVAL if new position is less than 0 or greater than 2^24 - 1.
[cc65] / libsrc / runtime / asreax3.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; CC65 runtime: Scale the 32 bit primary register by 8
5 ;
6
7         .export         asreax3
8         .importzp       sreg, tmp1
9
10 asreax3:
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         cpx     #$80            ; Get bit 7 into carry
24         ror     sreg+1
25         ror     sreg
26         ror     tmp1
27         ror     a
28         ldx     tmp1
29         rts
30