masm32 代码显示错误“A2206”
以下代码段应该遍历PEB
内的InInitializationOrderModuleList
并返回kernel32.dll的基地址。但是,当我尝试控制台汇编和链接
以下代码时,我收到错误消息,指出表达式中缺少运算符
。
.486
option casemap :none
include \masm32\include\masm32rt.inc
.code
start:
call main
exit
main proc
mov eax, large fs:30h
mov eax, [eax+0Ch]
mov esi, [eax+1Ch]
lodsd
mov eax, [eax+8]
print str$(eax)
ret
main endp
end start
因此,我将该行更改为:-
mov eax, fs:30h
并且我得到的错误是 error A2108: Use of register Should be ERROR
。我做错了什么?
the following code segment is supposed to walk the InInitializationOrderModuleList
inside the PEB
and return the base address of kernel32.dll. However, when I try to Console assemble and link
the following code I get the error stating that there is a missing operator in expression
.
.486
option casemap :none
include \masm32\include\masm32rt.inc
.code
start:
call main
exit
main proc
mov eax, large fs:30h
mov eax, [eax+0Ch]
mov esi, [eax+1Ch]
lodsd
mov eax, [eax+8]
print str$(eax)
ret
main endp
end start
So, I changed the line as :-
mov eax, fs:30h
and the error I get is error A2108: Use of register assumed to ERROR
. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚刚发现,添加
assume fs:nothing
可以解决问题。Just figured out, adding
assume fs:nothing
solves the problem.