Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Reading from flash in Assembly

2004-12-02 by Paul Maddox

Paul/Anyone

in this code,

>  MOV  r30,step  //this one 0-255?
>  MOV  r31,num   //this one 0-15?
>  SUBI r31,HIGH(-array)
>  LPM  r18,Z
>  OUT  PORTD,r18

whilst running the simulator, r31 and r30 don't seem to pick up the correct
address (0x0200)
even though I have at the end of my code (only very short)

.ORG 0200
.EQU array=0x00,0x01,0x02, etc ,etc (yeah, I know they're lame values but
its good for a test)

Any thoughts as to what I'm doing wrong?

Paul

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.