I have the following code (that works)
; begin
ARRAY: .DB 22,34,56,21 ; define an array of byte
LDI ZL, LOW (2*ARRAY) ; point to address "array"
LPM ; read array[0] e store it in R0
; end
Why I must multiple by 2 the address ARRAY?
On help I read that since the register Z does a bytewise access (instead of a wordwise access) you must multiple by 2 the address.
But I didn't understand exactly the reason.
Thanks in advance