ASM-blur Array question
CannibalRobotics
Posts: 535
I need a 256 byte array in a piece of prop assembly code. It's short and time critical application so I can't take any chances on the RDBYTE clock timing. I have room for a bunch of longs at the end in the cog RAM so I thought I would just REServe a bunch of longs at the end of my code and use them.
But, how do I reference anything past the first one.
Use for example a array tag named 'Slice'.
For example:
I also need the inverse of reading the data back out of the array.
Thanks in advance.
JIm-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
But, how do I reference anything past the first one.
Use for example a array tag named 'Slice'.
For example:
Loader MOV Slice, Sample ' This puts a 'Sample' into the address of Slice
Call #Get_Sample ' Load next sample into 'Sample'
ADD SliceNum,#1 'Increment the Slice Index
MOV (Slice + SliceNum), Sample ' so how do I do this????
'
'
'
' Uninitialized Data
Sample RES 1
SliceNum RES 1
Slice RES 256
I also need the inverse of reading the data back out of the array.
Thanks in advance.
JIm-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.

Comments
movd :store,#Slice ' Move the address of Slice into the instruction destination mov count,#256 ' Number of samples to gather :Loop Call #Get_Sample :store mov 0-0,Sample ' Copy the sample value to the next array element add :store,incr1 ' Add a constant that increments the address djnz count,#:Loop incr1 long $00000200 ' Add 1 to the 2nd 9 bit field (destination address) count res 1 slice res 256What is the "0-0" notation?
Thanks Mike!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.
Thanks Again.
J-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent, only $1.
Send cash and signature to CannibalRobotics.