Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/19/08 02:30
Read: times


 
#161044 - several ways
Responding to: ???'s previous message
first the table needs to be 0 to 9 in that order. A to F are not needed.

sprintf() is one choice each character - '0' in the array index.
Or the count % 10 (modulus) is the index. Divide by 10 and repeat. Lead zero suppression is optional.
The C div() function in stdlid may speed it up.

By the way the count is not in hex. it is in binary. Hex is a convenient way of displaying the data for people. The CPU does not care.

List of 12 messages in thread
TopicAuthorDate
Looking for a fast elegant solution to an SAA1064            01/01/70 00:00      
   several ways            01/01/70 00:00      
   Simple Table Lookup            01/01/70 00:00      
      Constructing the table symbolically            01/01/70 00:00      
      That looks like it will do the trick            01/01/70 00:00      
      Ok I'm here now.......            01/01/70 00:00      
         first convert to decimal, then to ASCII            01/01/70 00:00      
            So...            01/01/70 00:00      
               Keep track of binary/BCD/hex/ASCII            01/01/70 00:00      
                  Final answer and it works            01/01/70 00:00      
                     But '0' - 0x30 is zero :)            01/01/70 00:00      
               not exactly            01/01/70 00:00      

Back to Subject List