>Indeed, many of the earlier 8-bit microprocessor architectures >had explicit support for "packed BCD" (two decimal digits per >byte) arithmetic, either through a separate set of decimal >add/subtract instructions, a decimal arithmetic "mode" for >the ALU, or by the use of an extra "half-carry" status flag >and an "adjustment" instruction that got used after any of >the normal binary arithmetic instructions. The 14 bit control word 16F range has a half carry flag, I don't know if it has been carried through into the PIC30 family and derivatives (I believe the 18F range has it, but haven't checked). >There was even at least one architecture (I forget which one) >that supported doing arithmetic directly on ASCII digit characters, >but frankly, I never saw the point of that, and obviously, it >never caught on elsewhere. It had both "DAA" (decimal adjust >for arithmetic) and "AAA" (ASCII adjust for arithmetic) instructions. I worked on a small business machine from a company called Qantel, that worked on ASCII digits. Because it was designed for business use it made sense to do it that way. The CPU architecture was built around bit slice chips, the early ones used 74 series ALU, the later ones used 2901 bit slice units. But the chip that Dave remembers I am fairly sure was the original 8086 family. I do remember seeing the instructions listed. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist