]> git.sur5r.net Git - cc65/blob - libsrc/runtime/mulax5.s
cfg/atari-xex.cfg: fix typo in comment
[cc65] / libsrc / runtime / mulax5.s
1 ;
2 ; Ullrich von Bassewitz, 04.10.2001
3 ;
4 ; CC65 runtime: Multiply the primary register by 5
5 ;
6 ; Don't touch the Y-register here, the optimizer relies on it!
7
8         .export         mulax5
9         .importzp       ptr1
10
11 .proc   mulax5
12
13         sta     ptr1
14         stx     ptr1+1
15         asl     a
16         rol     ptr1+1
17         asl     a
18         rol     ptr1+1
19         clc
20         adc     ptr1
21         pha
22         txa
23         adc     ptr1+1
24         tax
25         pla
26         rts
27
28 .endproc
29
30