title: How to reverse string word by word in assembly language?
body: <p>I want program to reverse string word by word
  For example:</p>
  
  <p>input:</p>
  
  <p>Stack overflow</p>
  
  <p>Output:</p>
  
  <p>Kcats wolfrevo</p>
  
  <p>Please help me...</p>
  
  <p>Please fix this code and complete it:</p>
  
  <pre><code>.MODEL  SMALL
  .stack 64
  .DATA
      msg DB "stack owerflow"
          DB "$"
  .CODE
      .STARTUP
      LEA SI, msg
      MOV DI, SI
  l1:
      INC DI
      MOV AL, [DI + 1]
      CMP AL, ' '
      JNE l1 
  l2:
      MOV AL, [SI]
      xchg AL, [DI]
      MOV [SI], AL
      INC SI
      DEC DI
      CMP SI, DI
      JB  l2
  
  l3: 
      MOV AH, 09h
      LEA DX, msg
      INT 21h
      MOV AH, 08h
      INT 21H
  
  .STACK
  END
  </code></pre>