Help with long-alinging a byte array in VAR
Is there a way to tell the compiler to long-align a byte array in VAR?
'This is example code...
'Watch address $006C in main memory
'It gets over writen when the assembly runs the wrlong
'This is because buffer[noparse][[/noparse]] is not long-alinged in main memory
var
long temp
byte temp2
byte buffer[noparse][[/noparse]2048]
pub main
cognew(@StartASM, @Buffer)
temp2 := 1
repeat
repeat temp from 0 to 2047
buffer[noparse][[/noparse]temp] += temp2 * 2
DAT
org 0
StartASM mov timer,cnt
add timer,tick
mov Buffer_Pointer,par
mov Buffer_Pointer_Counter,End_Of_Buffer
:loop waitcnt timer,tick
wrlong Data,Buffer_Pointer
add Buffer_Pointer,#4
djnz Buffer_Pointer_Counter,#:loop
jmp StartASM
Data long $55555555
tick long 5_000
End_Of_Buffer long 512
timer res 1
Buffer_Pointer res 1
Buffer_Pointer_Counter res 1

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Thank you Paul for you quick response...
I will rearrange my variables.....