如何编译ASM文件

来源:百度知道 编辑:UC知道 时间:2024/07/03 02:30:37
我已经有MASM32 9.0了,里面没有一个叫MASM的文件,BIN下有一个LINK,
在MASM32的编译菜单下面有LINK。。。其他的记不起来了,点了之后都没有反映,
我现在怎么才能把ASM汇编源代码变为EXE文件呢?

一般常用二种:
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