title: Reading 5-digit decimal number in x86 assembly
body: <p>I am writing a number converter between the (b h d) numbering systems , the program accepts 
  16 bits binary number , or 4 digits hex. or 5 decimal.</p>
  
  <p>the reading procedure i wrote seems to have a problem when the decimal value is above 65535 (FFFFh) since im dealing with 16 bit registers and it cant contain larger values</p>
  
  <p>i would appreciate it if you help me.</p>
  
  <p>here is my read procedure:</p>
  
  <pre><code>Proc R  
         mov ah,01;read first digit
     int 21h
     mov saveal,al
  
     cmp al,0dh; if it is a new line break then dont read
     jz toret
  
     mov al,radex ; the radex value already entered by user
     mov ah,0
     mul dx
     mov dx,ax; multiplies the radex by the number entered so far to shift it 1 dig.                     
  
     mov al,saveal
     cmp al,65
     jge big2
     sub al,30h; taking decimal value of the character
  
     cont2:
     call checkerror
     mov ah,0
     add dx,ax; adding the digit to the number read so far
  
   loop R
  
   toret:
   ret 
   endp
  </code></pre>
  
  <p>Thanks 
  Nataly</p>