??? 01/28/05 11:04 Read: times |
#85999 - Surely: BCD to bin (hex is bin?) Responding to: ???'s previous message |
;**-ACC_bin
;Converts 2 digit BCD in ACC to bin in ACC ;does not detect hex (>99h) i/p; so 0A -> 0A, 10 -> 0A, 1A -> 14 ;uses r1 .ACC_bin: push B mov r1,a swap a anl a,#0fh ;msn mov B,#10 mul ab ab1: xch a,r1 ;lsn anl a,#0fh add a,r1 pop B abx: ret Still can't get the hang of this posting code nonsense - I added three spaces before my instuction lines and they get deleted during posting. You'll have to make do with colons to indicate labels... Dave |
Topic | Author | Date |
Hex 2 Bin problem with program 8051 | 01/01/70 00:00 | |
you do it first | 01/01/70 00:00 | |
hex to bin | 01/01/70 00:00 | |
Re: hex to bin | 01/01/70 00:00 | |
Surely: BCD to bin (hex is bin?) | 01/01/70 00:00 | |
like this | 01/01/70 00:00 | |
brackets![]() | 01/01/70 00:00 | |
Posting | 01/01/70 00:00 | |
better code | 01/01/70 00:00 | |
if you can't explain | 01/01/70 00:00 |