0

我想将数组中的组件相加,但是当我指定索引或循环值时,它会提前退出循环。假设循环 4 次,但只循环几次然后退出。谁能帮我吗?

          XDEF          Entry
          ABSENTRY      Entry

RAMStart  EQU           $1000

ROMStart  EQU           $1100

          ORG           RAMStart

List_1    DC.B          $FF, $01, $FE, $02

R1        EQU           $998

          ORG           ROMStart

Entry:
          CLRA

          CLRB

          LDX           #List_1

          LDAA          #4

          STAA          R1

          CLRA

AGAIN     ADDB          0, X

          INX

          LDAA          R1

          DECA

          STAA          R1

          BCC           AGAIN

CodeEnds  BRA           CodeEnds
4

0 回答 0