title: The END directive in assembly language
body: <p>I am new to assembly language and wrote this code:</p>
  
  <pre><code>main PROC
  
      mov eax,10000h          ; Eax=10000h
      add eax,40000h          ; Eax=50000h
      sub eax,20000h          ; Eax=30000h
      call DumpRegs
  
      exit
      main ENDP
  END main
  </code></pre>
  
  <p>I wanted to know why do you really need to put "main ENDP" and "end main" twice over?
  I am only using one procedure but seem to be ending this procedure twice.</p>
  
  <p>Is there a better way to write this if you are only using one procedure? </p>