可有人请向我解释(简单来说)的ESP之间的差异,EBP,和ESI寄存器是什么? [英] Can someone please explain to me (in very simple terms) what the difference between the esp, ebp, and esi register is?

查看:207
本文介绍了可有人请向我解释(简单来说)的ESP之间的差异,EBP,和ESI寄存器是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须学习汇编,我以什么不同的寄存器做/点很困惑。

I've got to learn assembly and I'm very confused as to what the different registers do/point to.

推荐答案

在某些架构,据我所知,所有的寄存器都是平等的,并没有真正超越寄存器的名字没有区别。在x86上可以主要用于通用计算的任何寄存器,但一些寄存器被隐式绑定指令集。

On some architectures, AFAIK, all registers are created equal, and there is really no difference beyond the name of the register. On x86 you can mostly use any registers for general-purpose computing, but some registers are implicitly bound to the instruction set.

关于特殊用途的寄存器的信息很多都可以在这里找到

Lots of information about special purposes for registers can be found here.

例如:


  • EAX ,蓄电池:许多运算指令隐含在 EAX
  • 运行
  • EDX 数据:<$ C:算术操作隐含的64位值 EDX 操作$ C> EAX

  • ECX ,计数器:循环隐递减 ECX

  • ESI ,源指标:一些字符串操作读一个字符串从内存指向 ESI

  • EDI ,目标索引:一些字符串操作写一个字符串到内存指向 EDI

  • EBP ,基指针:通常用来指向局部变量

  • 尤其,堆栈指针:指向堆栈的顶部,由,<$ C隐含使用$ C>弹出,呼叫 RET

  • eax, accumulator: many arithmetic instructions implicitly operate on eax
  • edx, data: some arithmetic operations implicitly operate on the 64-bit value in edx:eax
  • ecx, counter: loop implicitly decrements ecx
  • esi, source index: some string operations read a string from the memory pointed to by esi
  • edi, destination index: some string operations write a string to the memory pointed to by edi
  • ebp, base pointer: normally used to point to local variables
  • esp, stack pointer: points to the top of the stack, used implicitly by push, pop, call and ret

x86指令集是一个复杂的野兽,真的。许多指令都有隐含的使用一个寄存器或其他形式的更短。一些寄存器可以用来做一定的处理,有些则不能。

The x86 instruction set is a complex beast, really. Many instructions have shorter forms that implicitly use one register or another. Some registers can be used to do certain addressing while others cannot.

借助英特尔公司的80386程序员参考手册是一个不可替代的资源,它基本上告诉你一切有了解x86汇编,除了较新的扩展。

The Intel 80386 Programmer's Reference Manual is a irreplaceable resource, it basically tells you everything there is to know about x86 assembly, except for newer extensions.

借助 PC大会(五)本书是学习汇编很好的资源。

The PC Assembly (e)book is a great resource for learning assembly.

这篇关于可有人请向我解释(简单来说)的ESP之间的差异,EBP,和ESI寄存器是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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