I have been looking at the code on the piclist website for doing bin to hex ASCII conversion, and I'm sure there is a simpler way. I have seen some cunning code originally done for use on an 8080 or z80, and I was sure it was in the Scelbi 8080 cookbook that I have, but I cannot find it in there. It used the DC flag in a an extremely cunning way to detect the point at which you go from 9 to A in the sequence by using the DAA instruction, and used only about 5 or 6 8080 instructions without a single branch. I would like to try and convert it to a pic although the lack of a DAA instruction may not make this practical. Can anyone else remember the code segment I am talking about? It may have been in a z80 cookbook, or it could have been in a piece of Intel source code for the development system bios. It always looked such a nice piece of code that makes the common comparing to ASCII characters and doing jumps look extremely clumsy. I would appreciate getting hold of a copy of it if anyone has it. Thanks. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads