内存间接寻址MOVL - 组装 [英] Memory indirect addressing movl - assembly

查看:623
本文介绍了内存间接寻址MOVL - 组装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想了解究竟如何存储器间接使用汇编语言与AT&安培的作品; T语法

I'm trying to understand how exactly memory indirect addressing works in assembly language with AT&T syntax.

movl (%eax), %ebx

movl %eax, (%ebx)

下面是一个类似的问题,解释有关存储器间接

Here is a similar question that explains about memory indirect addressing

这是我所理解的:

在第一种情况下,你负荷中的数据由寄存器%EAX 指出,并将其存储在%EBX

In the first case, you load the data pointed to by the register %eax and store it in %ebx.

在第二种情况下,你商店在寄存器%EAX 数据地址空间指向寄存器%EBX 。我是不是正确的?

In the second case, you store the data in the register %eax to the address space pointed to by the register %ebx. Am I correct?

推荐答案

基本上语法为

movl source, destination

所以 MOVL(%EAX),EBX%确实是拷贝值地址指向%到EAX EBX%。和 MOVL%EAX(%EBX)是寄存器%EAX里面的值复制到地址由EBX%指向。

So movl (%eax), %ebx is indeed copy the value at address pointed to by %eax into %ebx. And movl %eax, (%ebx) is copy the value inside register %eax into the address pointed to by %ebx.

因此​​,我们确实你的理解是正确的。

So indeed your understanding is correct.

这篇关于内存间接寻址MOVL - 组装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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