title: Why is my masm32 program crashing whenever I try using interrupts?
body: <p>Here's the code:</p>
  
  <pre><code>.386 ;target for maximum compatibility
  .model small,stdcall ;model
  .code
      main:
          int 20h
      END main
  </code></pre>
  
  <p>Result: <a href="http://img705.imageshack.us/img705/3738/resultom.png" rel="nofollow noreferrer">http://img705.imageshack.us/img705/3738/resultom.png</a></p>
  
  <p>"test.exe has stopped working" - always right when it reaches the interrupt.</p>
  
  <p><a href="http://www.ctyme.com/intr/rb-2471.htm" rel="nofollow noreferrer">This is the interrupt I'm trying to use.</a> It should simply exit the program. Others I've tried include character input/output, etc.. Nothing works.</p>
  
  <p>I'm on windows 7, using masm32 with the WinAsm IDE.</p>
  
  <p>There are so many cool things it seems I should be able to do with interrupts... however, it crashes whenever I try to use an interrupt - always the same way.</p>
  
  <p>This seems related and possibly useful: <a href="https://stackoverflow.com/questions/1414260/dos-interrupt-in-masm-x86-assembly-crashing">DOS Interrupt in masm x86 assembly crashing</a></p>
  
  <p>...but I haven't really been able to figure anything out from it.</p>
  
  <p>Any suggestions?</p>