title: reverse an input string in assembly language
body: <p>I am trying to reverse the string in assembly but its not working its not reading the character of string ! 
  please help out , it is printing only $$$$$ against any character. what am i trying to write !  </p>
  
  <pre><code>.model small
  .stack 100h
  .data
  input db 10 dup ('$')
  output db 10 dup('$')
  
  .code
  main proc
  
  mov ax , @data
  mov ds , ax 
  mov bx , offset input
  mov cx , 0
  
  l1:
      mov ah , 1
      int 21h
      mov [bx] , al
      inc bx 
      inc cx
      cmp al , 13
      jne l1
  
      mov dx , offset input
      mov ah , 9 
      int 21h
  
      mov si , cx
  
      ou:
      mov dl , [bx+si]
      mov ah , 2
      int 21h
      dec bx
      dec cx 
      cmp cx   , 1
      jne ou
  
  
  mov ax, 4c00h
  int 21h
  
  main endp
  end main    
  </code></pre>