title: What is wrong with this assembly program?
body: <p>I am very new to assembly language programming, so it is probably a very obvious error, but...</p>
  
  <p>I use MSVC++, and when I compile any project that has a file with a .asm extension, it uses the rule</p>
  
  <pre><code>NAME    EXTENSIONS    COMMAND LINE                                  RULE FILE
  MASM    *.asm         ml.exe \c [All Options] [Additional Opti...   C:\Program Files\Microsoft Visual St...
  </code></pre>
  
  <p>And just to make sure the compiler works, I tried the code</p>
  
  <pre><code>main proc
    mov ax, 10
  main endp
  end main
  </code></pre>
  
  <p>But when I compiled it, I get three errors</p>
  
  <pre><code>.\compt1.asm(1) : error A2034:must be in segment block : main
  .\compt1.asm(2) : error A2034:must be in segment block
  .\compt1.asm(3) : fatal error A1010:unmatched block nesting : main
  </code></pre>
  
  <p>So I am just wondering, is there some obvious error in part of the code, or is it the compiler thats messing up.</p>