0

根据书,在汇编语言中,操作码 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 时会发生什么?请帮我 ((

4

0 回答 0