如何编译ASM文件
答案:3 悬赏:30 手机版
解决时间 2021-03-22 12:07
- 提问者网友:感性作祟
- 2021-03-22 08:00
如何编译ASM文件
最佳答案
- 五星知识达人网友:青尢
- 2021-03-22 08:07
一般常用二种:
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
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
全部回答
- 1楼网友:三千妖杀
- 2021-03-22 09:18
1. 在DOS命令中转到要编译文件所在的目录.
2.输入MASM.EXE空格+文件名.三下回车,就生成了OBJ文件,
3.link.exe空格+所生成的OBJ文件,再按三下回车,就生成了exe文件.
2.输入MASM.EXE空格+文件名.三下回车,就生成了OBJ文件,
3.link.exe空格+所生成的OBJ文件,再按三下回车,就生成了exe文件.
- 2楼网友:逐風
- 2021-03-22 08:51
先用ML.exe 编译 在link就OK了。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯