# .dw directive in AVR assembler

the piece of code below is mentioned in 8-bit AVR's instruction set as an example to explain the LPM instruction.

 ldi ZH, high(Table_1<<1) ldi ZL, low (Table_1<<1) lmp r16, Z ... Table_1: .dw 0x5876 ... 

I get that it's trying to load the address of flash memory word, labeled "Table_1", into Z register and then one byte of that word (depending on LSB of Z) into r16 register (or maybe I'm wrong about this part. please correct me if I am). What I don't get is the left shift in the first two lines. Can someone please explain why "Table_1" needs to be shifted left before begin loaded to Z?

• google "avr lpm.pdf" there's an entire application note devoted to your question. Alternatively "Rev. 3049A–FPSLI–04/02" is the actual Atmel/microchip document. – isdi Nov 24 '18 at 18:39
• Amjal - Although you might have to wait another 24hrs (due to a delay imposed by the site), please remember to accept your own answer, so that the site knows that your problem has been solved. Thanks. – SamGibson Nov 26 '18 at 18:42