The checksum is computed as the sum without carry of each byte of the array and is put in the register B. The size of the array is in register A and the array is in memory starting at the address in register X.
So far I got this program:
ORG $C000
LDAA #N
LDAB #$00
LOOP DECA
ADDB 0,X
INX
CMPA #0
BNE LOOP
END
I think that would do the job but I'm new with assembly and the 68HC11. Can you tell if you see something wrong? Thanks in advance.