To write a complete program in 32-bit assembly language using MASM one may start like this,
.686
.model flat,c
.stack 100h
.data
number sdword 5
.code
main proc
mov eax,number
ret
main endp
end main
whereas in 64-bit mode the code is written as
.data
number sdword 5
.code
main proc
mov eax,number
ret
main endp
end
The settings are set to default which led to occur an error while assembling in a 64-bit mode not because the platform is set to Win32, but instead the default entry point mainCRTStartup. To fix the problem it must be set to main in Advanced Linker options.
My question is, why encountering such a problem not happening in 32-bit mode, and what does the mainCRTStartup entry point referring to anyway? My second question is, why assembling in the 64-bit mode we omit the first directive lines .686 .model flat,c .stack 100h don't we have to allocate the stack, as well as the language type?
The directive .686 indicates to,
Enables assembly of nonprivileged instructions for the Pentium Pro processor. (32-bit MASM only.)
why it's not the case in the 64-bit mode?