;******************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 PSW ;SAVE STATUS MVI A,00001111B ;PUT LEAST SIGNIFICANT DIGIT MASK IN A ANA M ;MASK OFF LEAST SIGNIFICANT DIGIT ORI 00110000B ;CONVERT TO ASCII MOV C,A ;PUT IN REG C MVI A,11110000B ;PUT MOST SIGNIFICANT DIGIT MASK IN A ANA M ;MASK OFF MOST SIGNIFICANT DIGIT RRC RRC RRC RRC ;ROTATE RIGHT FOUR PLACES ORI 00110000B ;CONVERT TO ASCII MOV B,A ;PUT IN REG B POP PSW ;RESTORE STATUS RET ;RETURN BCDNL: DS 31 ;START OF BCD NUMBER END