
;               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
