如何解决Windows 10中的MASM错误A2006-Visual Studio
首先,对不起我的英语。好吧,我正在尝试执行从本书中摘录的一些指令,它被称为“现代x86汇编语言程序”。关于Visual Studio如何将C ++和MASM混合在一起的工作,这本书还不太清楚。因为从字面上看,第一个示例给了我一个错误。
ch02_01.asm(15):错误A2006:未定义符号:r8d
代码不是很广泛:
ch02_01.asm(15):错误A2006:未定义符号:r8d
; ------------------------------------------------------
; Ch02_01.asm
; ------------------------------------------------------
; extern "C" int IntegerAddSub_(int a,int b,int c,int d);
.model flat
.code
IntegerAddSub_ proc
; Calculate a + b + c - d
mov eax,ecx ;eax = a
add eax,edx ;eax = a + b
add eax,r8d ;eax = a + b + c
sub eax,r9d ;eax = a + b + c - d
ret ;return result to caller
IntegerAddSub_ endp
end
解决方法
使用r9d
和select * from c where c.Id=<someId> and c.Version > <someVersion> order by c.Version asc
意味着程序集实际上是x64本机的,因此它需要使用64位版本的MASM。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。