public binasc
extrn data (ascii)

BIN_TO_ASCII segment code
rseg BIN_TO_ASCII

binasc: mov b,#100
        div ab
        add a,#30h
        mov ascii,a
        mov a,#10
        xch a,b
        div ab
        add a,#30h
        mov ascii+1,a
        xch a,b
        add a,#30h
        mov ascii+2,a
        ret

end
