根据这本书, 在汇编语言中,操作码CPA比较内存中的操作数和累加器中的数据。 我想知道指令CPA如何影响A寄存器(累加器)
BR main
NUM1: .block 2
NUM2: .block 2
MSG1: .ascii “A register is less than 0\0x00”
MSG2: .asciiA register is more than 0\0x00”
Compared: .block2
main:
DECI NUM1,d. ; for example, 1
DECI NUM2,d. ; for example, 4
LDA NUM1,d
CPA NUM2,d. ;after comparing num1(which is now in -
-Accumulator) and num 2(in the memory)
STA Compared,d. ;if i store the contents in the Accumulator,
Whih figure would accumulator have? 3 or 2?
BRlT lessThan
BR End
LessThan:
STRO msg1,d
DECO compared,d
BR END
END:
stop
.End
#
根据PEP / 8仿真器, 结果是“寄存器小于0”,而累加器仍为1。
使用CPA会怎样?请帮助我((