COPY到与masm(也可以使用其它编译环境)环境在一个目录中进行编译.主要文件是masm.exe\masm.grp\link.exe\ml.exe\ml.err等.
编译方法一般常用二种:
1 先用MASM+编译对象文件(回车)形成OBJ文件(没有错误),然后用LINK +同样文件名.OBJ(回车)就行了
MASM XXX.ASM (回车)
D:\candmasm\masm>masm a1.asm
Microsoft (R) MASM Compatibility Driver
Copyright (C) Microsoft Corp 1993. All rights reserved.
Invoking: ML.EXE /I. /Zm /c /Ta a1.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993. All rights reserved.
Assembling: a1.asm
然后
D:\candmasm\masm>masm a1.asm
Microsoft (R) MASM Compatibility Driver
Copyright (C) Microsoft Corp 1993. All rights reserved.
Invoking: ML.EXE /I. /Zm /c /Ta a1.asm
Microsoft (R) Segmented Executable Linker Version 5.31.009 Jul 13 1992
Copyright (C) Microsoft Corp 1984-1992. All rights reserved.
Run File [a1.exe]:(回车)
List File [nul.map]:(回车)
Libraries [.lib]:(回车)
Definitions File [nul.def]:(回车)
LINK : warning L4021: no stack segment
执行文件生成
2 直接用ML.EXE生成
D:\candmasm\masm>ml a1.asm
Microsoft (R) Macro Assembler Version 6.11
Copyright (C) Microsoft Corp 1981-1993. All rights reserved.
Assembling: a1.asm
Microsoft (R) Segmented Executable Linker Version 5.31.009 Jul 13 1992
Copyright (C) Microsoft Corp 1984-1992. All rights reserved.
Object Modules [.obj]: a1.obj
Run File [a1.exe]: "a1.exe"
List File [nul.map]: NUL
Libraries [.lib]:
Definitions File [nul.def]:
LINK : warning L4021: no stack segment