Reputation: 95
Recently I started reading "Assembly Language for x86 Processors" and I've gotten to part where I need to compile my code. So I went to Google and searched how to properly setup the masm for VS12. For awhile, it worked just fine, but I decided to take a break from MASM and now when I got back all of a sudden this started happening. I get random errors, for instance, the compiler is not able to differentiate comments and treats them as errors, also I've been getting LNK1104 error saying that my file doesn't exist.
These are the settings that I used: http://kipirvine.com/asm/gettingStartedVS2012/index.htm#ProjectProperties
If anyone has idea on how I can fix this issue, oh and the code is really simple. Here:
.386
.model flat
.stack 4096
INCLUDE Irvine32.inc
.data
.code
main PROC
mov eax, 1337
exit
main ENDP
END main
Upvotes: 0
Views: 2485
Reputation: 133
I was able to compile your code, by removing the include from Irvine32.inc
In the case, you also have to remove the exit.
I try using the ML and Link command from the visual studio prompt... process described here: Compiling Assembly in Visual Studio
ml /c /Cx /coff code.asm
You get code.obj as the output.
Link with:
link code.obj /SUBSYSTEM:console /out:go.exe /entry:main
Now try it with his include file and his lib.
Upvotes: 1