; *************************************************** ; ; Returns the ASCII codes from the nibbles ; ; of a byte stored in the Acc. After being ; ; called the low nibble is in the ACC and ; ; the high nibble is in the B register. ; ; ; ; Usage: ; ; mov a, #byte ; ; CALL Byte2ascii ; ; ; ; Returns: ; ; B= high nibble ; ; A= low nibble ; ; *************************************************** ; Byte2ascii: mov b, a swap a acall Nibble2ascii xch a, b Nibble2ascii: anl a, #0x0f inc a movc a, @a+pc ret .ascii "0123456789ABCDEF"