title: Irvine x86 Assembly Output
body: <p>I am learning assembly language using Kip Irvine's Library and i was trying to create a simple program which takes two integers as input and outputs their addition and subtraction, but I am having problem outputting them.</p>
  
  <pre><code>    include irvine32.inc
  .data
      myMessage BYTE "Enter First Number: ",0Ah
      myMessage1 BYTE "Enter Second Number: ",0Ah
      myMessage2 BYTE "Addition: ",0Ah
      myMessage3 BYTE "Subtraction: ",0Ah
      num1 DWORD ?
      num2 DWORD ?
  .code
  main proc
      mov edx, offset myMessage
      call writestring
      call readint
      mov num1, eax
      mov edx, offset myMessage1
      call writestring
      call readint
      mov num2, eax
      mov eax, num1
      add eax, num2
      mov edx, offset myMessage2
      call writeint
      mov eax, num1
      sub eax, num2
      mov edx, offset myMessage3
      call writeint
  exit
  main endp
  end main
  </code></pre>
  
  <p>Expected output:</p>
  
  <blockquote>
    <p>Enter First Number: 5<br>
    Enter Second Number: 3<br>
    Addition: +8<br>
    Subtraction: +2  </p>
  </blockquote>
  
  <p>but I am getting</p>
  
  <p><a href="https://i.stack.imgur.com/m0T0H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m0T0H.png" alt="OUTPUT SS"></a> </p>