]> git.sur5r.net Git - cc65/blob - libsrc/runtime/mulax3.s
Merge pull request #609 from polluks/master
[cc65] / libsrc / runtime / mulax3.s
1 ;
2 ; Ullrich von Bassewitz, 04.10.2001
3 ;
4 ; CC65 runtime: Multiply the primary register by 3
5 ;
6
7         .export         mulax3
8         .importzp       ptr1
9                 
10 .proc   mulax3
11
12         sta     ptr1
13         stx     ptr1+1
14         asl     a
15         rol     ptr1+1
16         clc
17         adc     ptr1
18         pha
19         txa
20         adc     ptr1+1
21         tax
22         pla
23         rts
24
25 .endproc
26
27