Repeatedly dividing by 10, extracting each place as it spits out, is a good way to do this but consumes incredible # of machine cycles. If you have to generate lots of these, you can easily overrun your time budget. I use a compromise routine that (for an 8-bit value) subtracts off the100s place character, then uses a lookup table to extract a packed BCD char, to compose the last two characters. This is extremely fast- about 30 instruction cycles to extract and compose all three ASCII characters. --Bob At 02:09 PM 6/22/2003 -0700, you wrote: >Can anyone point me to some sample code (assembly) >where I can convert a byte into individual digits? >i.e. 128 to 1, 2 and 8. I am looking at piclist.com >but I can't seem to find what I am looking for. >Thanks > >__________________________________ >Do you Yahoo!? >SBC Yahoo! DSL - Now only $29.95 per month! >http://sbc.yahoo.com > >-- >http://www.piclist.com hint: The list server can filter out subtopics >(like ads or off topics) for you. See http://www.piclist.com/#topics -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics