大会MOV指令 [英] Assembly MOV Instruction

查看:302
本文介绍了大会MOV指令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好即时通讯工作的一个CTF挑战,不太了解该ASM命令:

Hi guys im working on a CTF challenge and don't quite understand this asm command:

mov    %edx,0x20(%esp,%eax,4)

林假设它:移动 $ EDX (为0x20 + $ ESP + $ EAX + 4)

然而,当我检查这个使用gdb这是不正确的。任何人都介意解释这个指令是如何工作的?

However when I checked this with gdb it isn't correct. Anyone mind explaining how this instruction works?

感谢您的帮助!

推荐答案

AT&放大器;用于x86内存引用T语法是这样的:

AT&T syntax for x86 memory references goes like this:

displacement(base,index,scale)

给位移+基地+(索引*刻度)。地址

giving the address of displacement+base+(index*scale).

这是目标内存地址为您instuction是%ESP + 0x20的+(4 * EAX%)。

That is, destination memory address for your instuction is %ESP+0x20+(4*%EAX).

这篇关于大会MOV指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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