汇编Pushf,pop命令,子changig结果?
我对此汇编代码有疑问:
%include "io.inc"
section .text
global CMAIN
CMAIN:
;write your code here
mov eax, 0FFFFFFFh
mov ebx, 0FFFFFFFh
sub ebx,eax
PUSHF
pop eax
PRINT_HEX 4, eax
xor eax,eax
ret
因此结果是246,但是如果我删除代码sub eBX,eax
,为什么结果会更改?
因为Sub EBX,EAX仅更改EBX中的值? EAX是相同的,所以为什么添加此代码会更改结果呢?
这可能很简单,但找不到答案。感谢您的回答!
I have a question about this assembly code:
%include "io.inc"
section .text
global CMAIN
CMAIN:
;write your code here
mov eax, 0FFFFFFFh
mov ebx, 0FFFFFFFh
sub ebx,eax
PUSHF
pop eax
PRINT_HEX 4, eax
xor eax,eax
ret
So the result is 246, but why does the result changes if i delete the code sub ebx,eax
?
Because sub ebx,eax only changes the value in ebx? and eax is the same so why adding this code changes the result then?
It is probably pretty simple but couldn't find the answer. Thanks for answering!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论