]> git.sur5r.net Git - cc65/blob - libsrc/runtime/mulax7.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / runtime / mulax7.s
1 ;
2 ; Piotr Fusik, 24.10.2003
3 ; originally by Ullrich von Bassewitz
4 ;
5 ; CC65 runtime: Multiply the primary register by 7
6 ;
7
8         .export         mulax7
9         .importzp       ptr1
10
11 .proc   mulax7
12
13         sta     ptr1
14         stx     ptr1+1
15         asl     a
16         rol     ptr1+1                  ; * 2
17         asl     a
18         rol     ptr1+1                  ; * 4
19         asl     a
20         rol     ptr1+1                  ; * 8
21         sec
22         sbc     ptr1
23         pha
24         txa
25         eor     #$ff
26         adc     ptr1+1                  ; * (8 - 1)
27         tax
28         pla
29         rts
30
31 .endproc
32
33