【发布时间】:2014-01-11 06:05:53
【问题描述】:
我正在使用 MASM 制作一个简单的消息程序。目前我在 Windows 8 64 位上运行 DOSBOX。我有一个文件夹 8086,其中包含 DEBUG、BIN2HEX、EDIT、EXE2BIN、LINK、MASM、TASM 和 TD 可执行文件。 MASM 不同于 ML 命令。
回到我的问题,当我尝试使用 masm Hello.asm 时。我得到了Error A2105 : Expected : instruction or directive。我在我的代码中使用了一些指令。
Hello.asm
.386
.model flat, stdcall
option casemap: none
extrn MessageBoxA@16 : PROC
extrn ExitProcess@4 : PROC
.data
HelloWorld db "Welcome to Assembly Language!", 0
MsgTitle db "Our First MessageBox", 0
.code
start:
mov eax,0
push eax
lea ebx , MsgTitle
push ebx
lea ebx, HelloWorld
push ebx
push eax
call MessageBoxA@16
push eax
call ExitProcess@4
end start
我不知道如何从这个 asm 创建 OBJ、LST、CRF。所以我就跳过这两个。
Object filenam [hello.OBJ] :
Source listing [NUL.LST]:
Cross-reference [NUL.CRF]:
hello.asm(3): error 2105 : Expected : instruction or directive
【问题讨论】:
-
您使用的是哪个版本的 MASM?
-
当 masm 询问您有关 .obj、.lst 和 .crf 的信息时,它是生成它们,您不必提供它们