title: Writing a user defined function
body: <p>I don't know why this code won't work. I want to call a user define function in MASM. Do I need to define a prototype in the program?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>include Irvine32.inc
  .code
  
       main proc
       call clrscr
       mov eax,60000h
       call sum1
       call dumpregs
       exit
  main endp
  end main
  sum1 proc
      add eax,20000h
      ret
  sum endp
  </code></pre>