title: Calculator in assembly
body: <p>I have the following assignment:</p>
  
  <p>Write a complete 8086 program to perform the calculator functions: ADD/SUB/DIV/MUL.
  When the user presses "=" your program should display the result. Only the numbers from 0-9 are input.</p>
  
  <pre><code>    ones  db ?
      tens  db ?
  
      mov   ah,1
      int   21h
      add   al,30H
      mov   tens, al
      mov   ah,1       
      int   21H 
      mov   dl,al
      cmp   dl, '+'
      je    addition
  
  addition:
      mov   ah,1    
      int   21h
      mov   bl,al   
      mov   ones,al
  </code></pre>
  
  <p>I have to do it by adding <code>30h</code> to each number then subtracting it. Can someone explain how I can do this?</p>