ORG $400400
COUNT DC.B 4
NUM1 DC.B $4E,$57,$29,$5A,$3B
NUM2 DC.B $31,$D4,$55,$E0,$9B
ORG $400410
SUBRTN MOVE.B $400401,D0
LEA $400405,A0
LEA $400410,A1
LOOP
ADDX -(A0),-(A1)
DBRA D0,LOOP
END $400410
So i have this code, and i want use an index (A0) at the end of of my nums1 (offset $400405),and an index (A1) at the end of my nums 2 (offset $400410), i want to create a loop that adds the indexes (ADDX -(A0),-(A1)) and store the add result to the end of my nums2 in descending order ($400405,$400404,$400403 etc.)
Also i think that i need to use DBRA for my 5 loops but im kinda stuck cause i lack experiance on programming on the 68k
Note: Running this code gives me the error "Address Error: Instruction at 400422 accessing address 400403"