The movsb (move string, bytes) instruction fetches the byte at address ds:si, stores it at address es:di, and then increments or decrements the si and di registers by one.
我知道 esi,si 和 edi,di 寄存器,
但不是
ds:si
和 es:di
,他们的意思是什么?
最佳答案
ds:si
和 es:di
表示相关寄存器引用的段:偏移量。当您在实模式下工作(其中每个偏移量最大为 64K)时,这一点非常重要。
在实模式下,段被偏移组合为 segment * 16 + offset
.
在保护模式下,段寄存器保存一个“选择器”。选择器引用的内存的基址与选择器本身的值没有直接关系——相反,选择器只是充当在表中查找数据的索引。然而,在通常情况下,这意味着很少——大多数(当前)保护模式环境都设置了 CS、DS、ES 和 SS,它们的基地址都设置为 0,最大偏移量为 4 GB,因此通过 DS 寻址与 ES 没有区别。
关于assembly - ds :si and es:di mean in assembly? 做什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7961606/