如何" MOV(%EBX,EAX%,4),%eax中"工作? [英] How does "mov (%ebx,%eax,4),%eax" work?

查看:700
本文介绍了如何" MOV(%EBX,EAX%,4),%eax中"工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一直致力于在组装任务,并在大多数情况下我明白了装配pretty好。或者,嗯,至少不够好这项任务。但这个MOV语句被绊倒了我。我真的AP preciate如果有人可以只解释这MOV语句是如何操作的寄存器值。

Been working on an assembly assignment, and for the most part I understand assembly pretty well. Or well at least well enough for this assignment. But this mov statement is tripping me up. I would really appreciate if someone could just explain how this mov statement is manipulating the register values.

MOV(%EBX,EAX%,4),%eax中

mov (%ebx,%eax,4),%eax

P.S。我不是能够找到这种特定类型由基本搜索MOV说法,所以我appologize如果我只是错过了它,我再次问问题。

P.S. I wasnt able to find this specific type of mov statement by basic searches, so I appologize if I just missed it and am re asking questions.

推荐答案

完整的内存解决AT&AMP模式格式;变速箱总成是:

The complete memory addressing mode format in AT&T assembly is:

offset(base, index, width)

因此​​,对于您的情况:

So for your case:

offset = 0
base = ebx
index = eax
width = 4

含义该指令是这样的:

Meaning that the instruction is something like:

eax = *(uint32_t *)((uint8_t *)ebx + eax * 4 + 0)

在一个类似C伪code。

In a C-like pseudocode.

这篇关于如何" MOV(%EBX,EAX%,4),%eax中"工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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