;Program to covert an ASCII number to a packed BCD number  

  .model small  

  .data  

  datase segment  

    answer db 0  

  datase ends  

  .stack  

  .code  

  assume ds:datase  

  main proc  

  mov ax, datase  

  mov ds, ax  

  mov ah, 01h  

  int 21h  

  and al, 0fh  

  mov answer, al  

  mov ah, 01h  

  int 21h  

  and al, 0fh;  

  mov cl, 04h  

  rol al, cl  

  or answer, al  

  mov ah, 4ch  

  int 21h  

  main endp  

  end main