assembly - 有谁知道为什么在 Visual Studio 2019 上使用 masm 代码时会弹出此错误?
问题描述
这是实际的代码:
extrn ExitProcess : proc
.DATA
num QWORD 80
sum QWORD ?
.CODE
_main PROC
mov rax, num
add rax, 20
mov sum, rax
xor rxc, rcx
call ExitProcess
_main ENDP
END
使用调试器时出现此错误:
1>------ Build started: Project: helloMASM, Configuration: Debug x64 ------
1>Assembling HelloMASM.asm...
1>HelloMASM.asm(16): error A2006: undefined symbol : rxc
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\masm.targets(70,5): error MSB3721: The command "ml64.exe /c /nologo /Zi /Fo"x64\Debug\HelloMASM.obj" /W3 /errorReport:prompt /TaHelloMASM.asm" exited with code 1.
1>Done building project "helloMASM.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
知道为什么会这样吗?另外,我注意到我在视觉工作室的以下模式中没有“注册”选项:
Debug->windows->registers
我尝试重新安装程序,但仍然存在。任何线索将不胜感激,谢谢。
解决方案
是的,我用“rxc”拼错了“rcx”,所以正确地写它解决了我的问题。此外,一旦我单击调试器,“调试”菜单下的“注册”选项就会出现。感谢您的帮助!
推荐阅读
- python - 列表索引超出范围... :(
- ios - 在 Xcode 中打印输出时出错(swift)
- php - 将php数组元素插入mysql数据库
- javascript - 在接口中用冒号声明字段
- machine-learning - 是什么导致 GAN 生成的图像看起来与训练集中提供的图像不同
- python - 括号内的Python3打印变量
- javascript - 如何修复猫鼬中的“.create不是函数”错误
- cmake - 为什么我的 rapidjson/example/serialize/serialize.cpp 的简化版本会引发分段错误?
- java - java集合中嵌套数据结构的复合键
- javascript - 如何在 ajax 标头中为每个用户发送 api 令牌?