;******************BCD TO ASCII SUBROUTINE****************** ;THE SUBROUTINE TAKES A TWO DIGIT BCD NUMBER IN MEMORY POINTED TO BY ;HL AND CONVERTS IT TO ASCII. THE MOST SIGNIFICANT DIGIT IS PUT ;IN REGISTER B WHILE THE LEAST SIGNIFICANT DIGIT IS PUT IN REGISTER C. ascii: push af ; SAVE STATUS ld a,00001111b ; PUT LEAST SIGNIFICANT DIGIT MASK IN A and (hl) ; MASK OFF LEAST SIGNIFICANT DIGIT or 00110000b ; CONVERT TO ASCII ld c,a ; PUT IN REG C ld a,11110000b ; PUT MOST SIGNIFICANT DIGIT MASK IN A and (hl) ; MASK OFF MOST SIGNIFICANT DIGIT rrca rrca rrca rrca ; ROTATE RIGHT FOUR PLACES or 00110000b ; CONVERT TO ASCII ld b,a ; PUT IN REG B pop af ; RESTORE STATUS ret ; RETURN bcdnl: ds 31 ; START OF BCD NUMBER end