| ??? 05/12/06 17:40 Modified: 05/12/06 17:42 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#116118 - another way: Responding to: ???'s previous message |
; convert hex to ASCII
;input; A = byte
;output: A = low nibble
; B = high nibble
hex_asc:
mov b, #16
div ab ;A = high, b = low
call _heas1
xch a, b
_heas1:
add a, #-10
jnc _heas2 ;below 10
add a, #'A' - '0' - 10
_heas2: add a, #'0' + 10
ret
end
Peter |
| Topic | Author | Date |
| its not working | 01/01/70 00:00 | |
| Easier to read | 01/01/70 00:00 | |
| Have you tried a simulator? | 01/01/70 00:00 | |
| It works | 01/01/70 00:00 | |
| i have also that | 01/01/70 00:00 | |
| another way: | 01/01/70 00:00 | |
| cute | 01/01/70 00:00 | |
| mr peter | 01/01/70 00:00 | |
simply... | 01/01/70 00:00 |



