title: Which register should be used to store the count?
body: <p>I am writing the code for the following program,</p>
  
  <h2>Objective:</h2>
  
  <p>Count the number of spaces pressed by the user. Break if enter is pressed.</p>
  
  <h2>Code:</h2>
  
  <pre><code>.MODEL SMALL
  .STACK 100H
  .DATA
      TEXT DB "Enter Character"
  .CODE
      MOV AX,9
      MOV DX,TEXT
      INT 21H
      BACK:
          INT21H
          CMP AL, " "
          JE INCREMENT
          CMP AL, "\n"
          JE OUT
          JMP BACK
  INCREMENT:
          INC ; which register do I use here? I feel that I am out of registers
          LOOP BACK
  OUT:
  ;display the count
  </code></pre>
  
  <p>In the above code, I have marked the area where I am feeling that I don't have anymore registers left to use. I have to use <code>AX</code>,<code>AL</code>,<code>DX</code>,<code>DL</code> registers in the code. Which other register can I use to store the count? Please help, thanks.</p>