【发布时间】:2018-02-06 12:35:44
【问题描述】:
在具有寄存器空间 A-Z 的假设 CPU ISA 中给出以下指令,编写程序集 程序从地址 A 复制 N 个字节到地址 B
MOV C, 100 - Move a constant value 100 to register C
LDR A, Addr – Load Register A with contents of address Addr
STR B, Addr - Store the contents of register B to address Addr
CMP X, Y - Compare X & Y and set Equal/Less than and Greater than status flags
BEQ address – Branch/Jump to address, on status flag Equal is set
BGT address – Branch on greater than
BLT address – Branch on less than
谁能告诉我怎么做,我不知道,因为没有inc、dec 和一些算术指令,我该怎么做?
我不需要代码,但提前感谢任何线索我该如何进行。
【问题讨论】:
-
我不知道,因为没有任何算术指令我怎么能继续。
-
我认为这甚至不是图灵完备的 ISA