为什么 MOV 不能将两个操作数都作为内存位置? [英] Why can't MOV have both operands as memory locations?

查看:24
本文介绍了为什么 MOV 不能将两个操作数都作为内存位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到 MOV 指令不能有两个操作数的内存位置.

I read that MOV instruction cannot have memory locations for both its operands.

例如:MOV [0012H], [0016H] 是不允许的.

为什么会这样?

其他指令是否可以为它的两个操作数设置内存位置?

And can other instructions have memory locations for both its operands?

推荐答案

这是他们创建 CPU 时的设计决定.您拥有更多寻址模式和更多指令,指令获得更大(就表示指令所需的位数而言).更大的指令需要更长的时间从内存中获取.

It's was a design decision when they created the CPU. More addressing modes you have and more instructions, larger (in terms of number of bits required to represent instruction) the instructions get. And larger instruction take longer to fetch from memory.

换句话说,x86 的指令集不是正交.只编写非常有限的汇编代码并不一定是坏事,至少现在不是.

In other words, x86's instruction set is not orthogonal. It is not necessarily bad, at least not now, that only very limited amount of assembly code is written.

其他一些 CPU(例如同一个时代设计的 MC680xx)可以做到这一点.

Some other CPUs (for example MC680xx designed in same era) can do that.

这篇关于为什么 MOV 不能将两个操作数都作为内存位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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