| ??? 12/20/01 09:20 Read: times |
#17851 - RE: Converting HEX to DEC, 1 dig |
I don't get it.
Would you be so kind to explain. Let's assume ACC contains 69H or 105 decimal (the value of ADC). After the first addition ACC contains F9H with Carry and AC cleared. At DA A because high nibble is 1111b we add 60H to ACC, ACC contains now 59H with Carry set and AC cleared. At ADDC we have: 59H + 40H + Carry = 9AH with Carry and AC cleared. The last DA A performs in two steps : - because lower nibble is 1010b we add 06H to ACC, now ACC contains A0H with AC flag set. - because higher nibble is now 1010b we add 60H, ACC contains now 00H with Carry flag set Can you tell me what's the deal ? What kind of conversion have we done ? What nibble we would want to convert to ASCII digits ? Lower ? Higher ? Both of them ? As a matter of fact what we would like to do? We have 69H value in accumulator. We can send this to 7segments decoder, 3 digits display as BCD bytes 01H then 05H. Or we can send to LCD display as three ASCII digits 31H, 30H, 35H. 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 |



