D:\try>masm 1.asm
Microsoft (R) MASM Compatibility Driver
Copyright (C) Microsoft Corp 1993. All rights reserved.
Invoking: ML.EXE /I. /Zm /c /Ta 1.asm
Microsoft (R) Macro Assembler Version 6.15.8803
Copyright (C) Microsoft Corp 1981-2000. All rights reserved.
Assembling: 1.asm
1.asm(1) : fatal error A1000: cannot open file : 1.obj
为什么无法生成obj文件,代码对的,麻烦帮忙看下
是不是window11的问题?其他电脑上我尝试了下可以的
你的masm添加到系统环境变量了没
用1.asm的绝对路径试一下
masm D:/try/1.asm
win11暂不支持汇编
汇编语言程序的汇编和链接使用的命令分别是ML.EXE和LINK.EXE,不是MASM.EXE
cannot open file: filename
The assembler was unable to open a source, include, or output file.
One of the following may be a cause:
https://learn.microsoft.com/en-us/cpp/assembler/masm/ml-fatal-error-a1000?view=msvc-170
使用相对路径编译.asm文件生成试试。
1️⃣这样是相对路径(成功生成)
2️⃣这样是物理路径(出现错误)
如有帮助,还请采纳!谢谢!