title: ASSEMBLY - how to do sum between two numbers(interval)
body: <p>Hey guys can you help? I dont know how to do sum between two numbers
  For example :</p>
  
  <p>first number><strong>1</strong></p>
  
  <p>second number><strong>5</strong></p>
  
  <p>sum would be > 1+2+3+4+5 = <strong>15</strong></p>
  
  <p>I did only sum of two numbers. I dont know how to do this number sequences, my code is below. Thank you</p>
  
  <pre><code>MAIN:
      MOV AX, SEG DATA
      MOV DS,AX
  
      mov ah, 9h                  ; msg for first number
      lea dx, msg
      int 21H
  
      mov ah, 1h                  ; read char
      int 21H
  
      sub al, '0'                 ; strip ASCII
      mov x, al                   ; storing first number
  
      mov ah, 9h                  ; msg for second number
      lea dx, msg2
      int 21H
  
      mov ah, 1h                  ; read char
      int 21H
  
      sub al, '0'
      mov y, al                   ; storing second number
  
      mov ah, 9h                  ; msg for sum
      lea dx, msg3
      int 21H
  
      mov dl, x
      add dl, y
      add dl, '0'                 ; x + y
  
      mov ah, 2h                  ; printing
      int 21H
  
  
      MOV AX,4C00H    ;end
      INT 21H
  
  CODE ENDS
      END MAIN
  </code></pre>