]> git.sur5r.net Git - cc65/blob - libsrc/tgi/tgi_textwidth.s
Rename the 8x8 multiplication using the same scheme as for the 16x16
[cc65] / libsrc / tgi / tgi_textwidth.s
1 ;
2 ; Ullrich von Bassewitz, 2009-10-30
3 ;
4
5
6         .include        "tgi-kernel.inc"
7
8         .import         _strlen, pushax, tosumula0
9
10 ;-----------------------------------------------------------------------------
11 ; unsigned __fastcall__ tgi_textwidth (const char* s);
12 ; /* Calculate the width of the text in pixels according to the current text
13 ;  * style.
14 ;  */
15 ;
16 ; Result is  strlen (s) * tgi_textmagw * tgi_fontsizex
17 ;
18
19 .proc   _tgi_textwidth
20
21         jsr     _strlen
22         jsr     pushax
23         lda     _tgi_charwidth
24         jmp     tosumula0
25
26 .endproc
27