title: Assembly integer overflow
body: <p>On executing div command, it gives an error: integer overflow. first I want to know how this is integer overflow, then obviously how to correct it? Thank you in advance.</p>
  
  <pre><code>TITLE My First Program (Test.asm)
  INCLUDE Irvine32.inc
  .data
  cr1grade WORD 5
  cr2grade WORD 10
  cr3grade WORD 4
  cr4grade WORD 8
  cr5grade WORD 5
  totalcredit WORD 16
  
  .code
  main PROC
  mov ax,cr1grade
  add ax,cr2grade
  add ax,cr3grade
  add ax,cr4grade
  add ax,cr5grade     ;total grade points =&gt; 32
  mov bx,totalcredit  ;total credit hrs =&gt; 16
  div bx              ;divide grade points by credit hrs =&gt;2
  
  call DumpRegs
  exit
  main ENDP
  END main
  </code></pre>