Alan, I just checked the Scelbi 6800 and Z-80 cookbooks and couldn't find the code to which you refer. In fact, the main conversion routine for both books, is ASCII to BAUDOT (!). Cheers, Andrew ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag ---- On , Alan B. Pearce (A.B.Pearce@RL.AC.UK) wrote: > 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 > > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads