CLRF tens ;clear registers
CLRF ones
CONVERT_TENS ;convert the hundreds into ascii value routine
MOVF ADRESH ;move the a2d result to the working register
SUBLW .10 ;subtract by 10
BTFSS STATUS,C ;is the result still a positive number
GOTO CONVERT_ONES ;if its a negative, go to convert the ones
MOVWF ADRESH ;if still positive, move the new subtracted result to the ADRESH register
INCF tens ;and increment the tens register by 1
BRA CONVERT_TENS ;keep looping until the result is a negative value
CONVERT_ONES
MOVF ADRESH
SUBLW .1
BTFSS STATUS,C
GOTO READY
MOVWF ADRESH
INCF ones
BRA CONVERT_ONES
READY
MOVF tens ;add 48 to huns and ones to convert them to ASCII
ADDLW .48
MOVWF tens
MOVF ones
ADDLW .48
MOVWF ones