| ??? 03/23/00 21:36 Read: times |
#1927 - Need help with code |
I have assembled subroutine that it's job is to convert a 2 digit BCD number in Hex to an 2 digit Decimal , and also to display this 2 digit number on the lcd (thus to add 30h to them).
I written the following code to do that , but somewhy It doesn't work properly , if someone could please check it , or better , have a diffrent code to do that , I would appreciate the help. Input ->Acc output1 ->MSB = Acc output2 ->LSB = R3 temporarly registers R4. BTD: MOV R3,A MOV R4,A ANL A,#0F0H SWAP A MOV B,#06H MUL AB XCH A,R4 ANL A,#0FH ADD A,R4 DA A XCH A,R3 ANL A,#0F0H ADD A,R3 BTD1: MOV R3,A ANL A,#0FH ADD A,#30H XCH A,R3 SWAP A ANL A,#0FH ADD A,#30H RET |
| Topic | Author | Date |
| Need help with code | 01/01/70 00:00 | |
| RE: Need help with code | 01/01/70 00:00 | |
| RE: Need help with code | 01/01/70 00:00 | |
| RE: Need help with code | 01/01/70 00:00 | |
| RE: Need help with code | 01/01/70 00:00 | |
| RE: Need help with code | 01/01/70 00:00 | |
RE: Need help with code | 01/01/70 00:00 |



