title: Print integer to console in x86 assembly
body: <p>When I add two values in 16 bit assembly, what is the best way to print the result to console?</p>
  
  <p>At the moment I have this code:</p>
  
  <pre><code>;;---CODE START---;;
  mov ax, 1   ;put 1 into ax
  add ax, 2   ; add 2 to ax current value
  mov ah,2  ; 2 is the function number of output char in the DOS Services.
  mov dl, ax ; DL takes the value.
  int 21h    ; calls DOS Services
  
  mov ah,4Ch   ; 4Ch is the function number for exit program in DOS Services.
  int 21h      ; function 4Ch doesn't care about anything in the registers.
  ;;---CODE END---;;
  </code></pre>
  
  <p>I think that dl value should be in ASCII code, but I'm not sure how to convert ax value after addition into ASCII.</p>