最近,我开始关注装配&计算机物理的东西,&当我到达编写汇编代码时,我试图链接我正在使用的书给我的第一个程序,但每当我尝试这样做时,我收到以下错误消息:
E:\masm32\code.asm(1) : error A2008: syntax error : floating point constant
E:\masm32\code.asm(2) : error A2085: instruction or register not accepted in cur
rent CPU mode
\masm32\include\windows.inc(78) : error A2119: language type must be specified
...
\masm32\include\masm32.inc(153) : error A2119: language type must be specified
\masm32\include\masm32.inc(154) : fatal error A1012: error count exceeds 100; st
opping assembly
我在windows xp&上使用MASM32代码我试图组装&链接:
386.
model flat, stdcall.
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
data.
HelloWorld db "Hello World!", 0
code.
start:
invoke StdOut, addr HelloWorld
invoke ExitProcess, 0
end start
&安培; Thnx提前。
答案 0 :(得分:2)
你把点放在错误的地方。它们应该在指令前面加上前缀,而不是后缀:
.386
.model flat, stdcall