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