ds:si和es:di在汇编中意味着什么? [英] What do ds:si and es:di mean in assembly?

查看:2655
本文介绍了ds:si和es:di在汇编中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

movsb(移动字符串,字节)指令获取地址处的字节 ds:si,将其存储在地址es:di中,然后递增或递减 si和di寄存器加1.

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寄存器,

I know esi,si and edi,di registers,

但不是ds:sies:di

它们是什么意思?

推荐答案

ds:sies:di表示相关寄存器所引用的segment:offset.当您在实模式下工作时(偏移最大为每个64K),这尤其重要.

ds:si and es:di mean the segment:offset referred to by the registers in question. This is primarily important when you're working in real mode (where offsets are a maximum of 64K apiece).

在实模式下,将偏移的段组合为segment * 16 + offset.

In real mode, the segment are offset are combined as segment * 16 + offset.

在保护模式下,段寄存器包含一个选择器".选择器引用的内存的基地址与选择器本身的值并不直接相关,而是选择器仅充当在表中查找数据的索引.但是,在常规情况下,这意味着很少-大多数(当前)保护模式环境都使用CS,DS,ES和SS进行设置,而CS,DS,ES和SS均设置为基地址0且最大偏移量为4 GB,因此通过DS与ES寻址没有区别.

In protected mode, a segment register holds a "selector". The base address of the memory referred to by the selector isn't directly related to the value of the selector itself -- rather, the selector just acts as an index to look up data in a table. In the usual case, however, this means very little -- most (current) protected mode environments are set up with CS, DS, ES and SS all set up with base addresses of 0 and maximum offsets of 4 Gigabytes, so addressing via DS vs. ES makes no difference.

这篇关于ds:si和es:di在汇编中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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