
;***************************************************
;NAME: DISP_NIBH and DISP_NIBL
;   Routine to convert a binary nibble to hex
;   and send the value to display as a single
;   digit hex ascii value.
;
;   Entry A = binary nibble value to display
;---------------------------------------------------

DISP_NIBH:
        SWAP    A                   ; put the upper nibble to low position
;
DISP_NIBL:
        ANL     A, #0FH             ; mask to single nibble
        ADD     A, #30H             ; convert to ascii
        DA      A
        MOV     C, ACC.6            ; convert to A-F
        ADDC    A, #0
        CALL    DISP_CHAR
        RET

;***************************************************
;NAME: DISP_BYTE
;   Routine to convert a binary byte to hex
;   and send the value to display as two digit
;   hex ascii value.
;
;   Entry A = binary byte value to display
;---------------------------------------------------

DISP_BYTE:
        PUSH    ACC
        CALL    DISP_NIBH           ; display the upper nibble
        POP     ACC
        CALL    DISP_NIBL           ; display the lower nibble
        RET
