x86汇编 - 对EAX“为test1”EAX? [英] x86 Assembly - 'testl' eax against eax?

查看:220
本文介绍了x86汇编 - 对EAX“为test1”EAX?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解一些总成。

大会如下,我感兴趣的是为test1行:

Assembly as follows, I am interested in the testl line:

000319df  8b4508        movl   0x08(%ebp), %eax  
000319e2  8b4004        movl   0x04(%eax), %eax  
000319e5  85c0          testl  %eax, %eax  
000319e7  7407          je     0x000319f0  

我试图理解为test1 %EAX 之间的点和%EAX ?我认为这是什么code是并不重要的细节,我只是想了解与自己的测试 - 不会值始终是真的

I am trying to understand that point of testl between %eax and %eax? I think the specifics of what this code isn't important, I am just trying to understand the test with itself - wouldn't the value always be true?

推荐答案

它测试 EAX 是否为0,或以上,以下。在这种情况下,将跳转如果 EAX 0。

It tests whether eax is 0, or above, or below. In this case, the jump is taken if eax is 0.

这篇关于x86汇编 - 对EAX“为test1”EAX?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆