SEG指令在8086中起什么作用? [英] What does SEG directive do in 8086?

查看:498
本文介绍了SEG指令在8086中起什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SEG A:

Assigns the content held in segment register corresponding to the segment in which A resides to the operand.

我想这意味着如果A位于数据段中,则SEG ADS相同.

I guess that means that if A lies in Data Segment, SEG A is the same as DS.

由于DS保存数据段的基地址,所以

Since DS holds the base address of the Data Segment, does

MOV AX, LEA A
MOV DX, SEG A
MOV AX, [AX + DX]

A物理地址复制到AX吗?

推荐答案

我想这意味着如果A位于数据段中,则SEG A与DS相同.

I guess that means that if A lies in Data Segment, SEG A is the same as DS.

如果DS指向数据段,则正确.

Correct, if DS points to Data Segment.

确实
MOV AX,LEA A
MOV DX,SEG A
MOV AX,[AX + DX]
将A的物理地址复制到AX?

does
MOV AX, LEA A
MOV DX, SEG A
MOV AX, [AX + DX]
copy the physical address of A to AX?

最后一条指令无效,在任何x86 CPU中都不存在.因此,此代码完全不执行任何操作.如果有的话,它只是位于.asm文件中,等待更正和组装.

The last instruction is invalid, it does not exist in any of x86 CPUs. As such, this code does nothing at all. If anything, it just sits in an .asm file waiting to be corrected and assembled.

这篇关于SEG指令在8086中起什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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