为什么mov指令有使用斧头,而不是两个段寄存器直接? [英] Why does the mov instruction have use ax instead of two segment registers directly?

查看:270
本文介绍了为什么mov指令有使用斧头,而不是两个段寄存器直接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到code,如:

mov ax, cs
mov ds, ax
mov es, ax

为什么我不能只是COM preSS这:

Why can't I just compress this to:

mov ds, cs
mov es, cs

因为它的使用累加寄存器是第一种方式快?但是,这似乎并不直观,因为CS和DS的段的注册。或者是有一些限制的,我不知道的?

Is the first way faster since its using the accumulator register? But that wouldn't seem intuitive since cs and ds are segment registers. Or is there some restriction that I'm unaware of?

我使用NASM的方式。

I'm using nasm by the way.

推荐答案

您不能MOV段寄存器段寄存器 - 有没有它的指令

You can't mov segment register to segment register -- there's no instruction for it.

这篇关于为什么mov指令有使用斧头,而不是两个段寄存器直接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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