本文介绍了ESI与放大器的目的; EDI寄存器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是实际的用途和使用电子数据交换和放大器; ESI汇编注册?

What is the actual purpose and use of the EDI & ESI registers in assembler?

我知道他们是用于字符串操作的一件事。

I know they are used for string operations for one thing.

可有人还举个例子?

推荐答案

有几个操作就可以的只有的做DI / SI(或其扩展的同行,如果你没有学过ASM于1985年)。其中有

There are a few operations you can only do with DI/SI (or their extended counterparts, if you didn't learn ASM in 1985). Among these are

REP STOSB
REP MOVSB
REP SCASB

其中分别是操作重复(=质量)存储,加载和扫描。你要做的就是建立SI和/或DI在一个或两个操作数点,也许是摆在CX计数,然后让'呃裂口。这些都是在上一次一堆字节合作经营,他们那种把CPU自动。因为你没有明确的编码循环,他们做他们的事情更有效(通常)比手工codeD环。

Which are, respectively, operations for repeated (= mass) storing, loading and scanning. What you do is you set up SI and/or DI to point at one or both operands, perhaps put a count in CX and then let 'er rip. These are operations that work on a bunch of bytes at a time, and they kind of put the CPU in automatic. Because you're not explicitly coding loops, they do their thing more efficiently (usually) than a hand-coded loop.

万一你想知道:根据​​您设置操作后,重复存储可以是一些简单的像冲压值为0到一个大的内存连续块; MOVSB​​时,我想,把数据从一个缓冲区拷贝(当然,任何字节串)到另一个;和SCASB被用来寻找匹配某些搜索准则字节(我不知道,如果是搜索只在平等,还是什么&ndash的,你可以去查一下:))

Just in case you're wondering: Depending on how you set the operation up, repeated storing can be something simple like punching the value 0 into a large contiguous block of memory; MOVSB is used, I think, to copy data from one buffer (well, any bunch of bytes) to another; and SCASB is used to look for a byte that matches some search criterion (I'm not sure if it's only searching on equality, or what – you can look it up :) )

这是大多数的这些东西都是暂存器的。

That's most of what those regs are for.

这篇关于ESI与放大器的目的; EDI寄存器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 10:02