title: Assembly Language Loop Not working
body: <p>I am beginner in assembly language.I want to print 1-9 with spaces. I want to print like this </p>
  
  <pre><code>1 2 3 4 5 6 7 8 9
  </code></pre>
  
  <p>Here is my code I am using <strong>masm</strong> this code hangs <strong>command prompt</strong>.</p>
  
  <p>Why this is not working?</p>
  
  <pre><code>DATA_SEG SEGMENT
  DATA_SEG ENDS
  CODE_SEG SEGMENT 
          ASSUME CS:CODE_SEG , DS:DATA_SEG
  MAIN PROC FAR
      MOV AH,02
      MOV AX,'0'
      MOV CX,10
  L1:
      MOV DX,AX
      INT 21H
      INC AX
      LOOP L1
  
      MOV AX,4C00H 
      INT 21H
      MAIN ENDP
  CODE_SEG ENDS
  END MAIN    
  </code></pre>