I've spent at least a week looking for references regarding this issue and I have to say I'm starting to give up.
I can't seem to be able to find any notion regarding the number of elements in an array stored in register B on a HCS12. The memory address of this register is stored in register X.
The purpose is to find the number of elements to create a subroutine calculating the average of the elements of that array.
I'd really appreciate any kind of help!
edit: Corrected a mistake in my question