title: Take string length and reverse in 8086 emulator
body: <p>Can anyone help me to reverse this string?</p>
  <p>Here is my code</p>
  <pre><code>include 'emu8086.inc'    
  
   PRINTN 'Enter length of string'
   mov ah,1h
   int 21h
  
   printn                 
   
   print &quot;Enter String here: &quot;
   mov cl,al
   sub cl,'0'         
   mov dl,cl           
   mov bx,0
   
   
   p1:  
   
   mov ah,1h
   int 21h             
   
   mov [bx],ax        
   inc bx             
   dec cl
   cmp cl,0           
   jne p1       
   
   
   printn
   PRINT 'inputted string : '
   
   mov cl,dl
   mov bx,0
  
   output:
   mov dl,[bx]
   
   mov ah,2h
   int 21h    
   
   inc bx   
   dec cl
   cmp cl,0  
   jne output
   printn     
   
   mov ax, 4c00h  
   int 21h
  
  ret
  </code></pre>