/[avr-libc]/avr-libc/libc/misc/ultoa.S
ViewVC logotype

Diff of /avr-libc/libc/misc/ultoa.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.4.1 by aesok, Wed Oct 12 20:37:02 2005 UTC revision 1.3.4.2 by aesok, Wed Oct 19 20:50:04 2005 UTC
# Line 64  Line 64 
64    
65    
66  _U(ultoa):  _U(ultoa):
67          mov     ZH, a_str_hi    ; Z = &string          X_movw  ZL, a_str_lo    ; Z = &string
         mov     ZL, a_str_lo  
68          push    r28             ; save r28          push    r28             ; save r28
69          push    ZH              ; keep &string          push    ZH              ; keep &string
70          push    ZL          push    ZL
# Line 90  _U(ultoa): Line 89  _U(ultoa):
89          subi    r22, 0xd9       ; + 'a' - 10 - '0'          subi    r22, 0xd9       ; + 'a' - 10 - '0'
90  10:  10:
91          st      Z+, r22         ; write character to string in reverse order!          st      Z+, r22         ; write character to string in reverse order!
92          mov     a_val_lo, r18   ; quotient -> dividend          X_movw  a_val_lo, r18   ; quotient -> dividend
93          mov     a_val_hi, r19          X_movw  a_val_hlo, r20
         mov     a_val_hlo, r20  
         mov     a_val_hhi, r21  
94          subi    a_val_lo, 0          subi    a_val_lo, 0
95          sbci    a_val_hi, 0          sbci    a_val_hi, 0
96          sbci    a_val_hlo, 0          sbci    a_val_hlo, 0

Legend:
Removed from v.1.3.4.1  
changed lines
  Added in v.1.3.4.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26