| ??? 12/19/01 20:35 Read: times |
#17835 - RE: Converting HEX to DEC-J.Guy |
That's absolute right.
I haven't in mind to go into all the details of DA A. It was just a small extract from that guide. However, the purpose of using DA A is a Decimal adjust of Accumulator for Addition. At least the MCS51 developer's wish to be. If we can take advantage of using DA A in clever routine, then definitely that don't bother someone. In fact even setting AC flag is a result of addition or substraction of two bytes. BCDs or not. Besides this, we can apply DA A not merely after addition. If Accumulator low nibble is greater than nine (i.e. loaded from port), during execution of DA A, six is added to ACC, producing the proper BCD digit in the low-order nibble. Essentially this instruction performs the decimal conversion by adding 06H, 60H or 66H to the Accumulator, depending on initial Accumulator and PSW conditions (AC and C flags). I wrote all these things not for you (I know it's already very well fitted on your background) but for Ravi's presumption that DA A performs simply the decimal conversion of a hexadecimal number. Or as you wrote, NOT ON ITS OWN. And all these, due to the old 447 BCD-seven segments dislay decoder. Regards, Silviu |
| Topic | Author | Date |
| Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC | 01/01/70 00:00 | |
| RE: Converting HEX to DEC-J.Guy | 01/01/70 00:00 | |
| RE: Converting HEX to DEC, 1 dig | 01/01/70 00:00 | |
| RE: Converting HEX to DEC, 1 dig | 01/01/70 00:00 | |
| RE: Converting HEX to DEC, 1 dig | 01/01/70 00:00 | |
| RE: Converting HEX to DEC, 1 dig | 01/01/70 00:00 |



