| ??? 02/23/99 04:24 Read: times |
#245 - RE: interface to lcd |
Here's a code snippet.
Hope it helps. figure out the rest. It should not be too hard. :) BTW: Don Knuth has some prime information in his book about radix conversion. ; ========================================================== ; binasc ; binasc takes the contents of the accumulator and converts it ; into two ascii hex numbers. the result is returned in the ; accumulator and r2. ; ========================================================== ; binasc: mov r2, a ; save in r2 anl a, #0fh ; convert least sig digit. add a, #0f6h ; adjust it jnc noadj1 ; if a-f then readjust add a, #07h noadj1: add a, #3ah ; make ascii xch a, r2 ; put result in reg 2 swap a ; convert most sig digit anl a, #0fh ; look at least sig half of acc add a, #0f6h ; adjust it jnc noadj2 ; if a-f then re-adjust add a, #07h noadj2: add a, #3ah ; make ascii ret |
| Topic | Author | Date |
| interface to lcd | 01/01/70 00:00 | |
| RE: interface to lcd | 01/01/70 00:00 | |
| RE: interface to lcd | 01/01/70 00:00 | |
| RE: interface to lcd | 01/01/70 00:00 | |
RE: interface to lcd | 01/01/70 00:00 |



