我想在数组中添加组件,但是当我指定索引或循环值时,它会提前退出循环。它假设循环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