Yahoo Groups archive

AVR-Chat

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

Message

Re: [AVR-Chat] This assembly oughta be something silly...

2005-06-15 by Zack Widup

On Wed, 15 Jun 2005, Alex De Lara wrote:

> Ok, this must be something idiotic that I cannot figure out.
> The Z register is being properly loaded with the correct
> address of the string, but the string's bytes are never
> loaded in r16.
> Why it always gets 0xff ? Obviously it is reading from
> somewhere else :-)
> What's the trick ?
> 
> 
>     ldi     ZH,high(Test_str)  ; Load Z register high   
>     ldi     ZL,low(Test_str)   ; Load Z register low

Change the above two lines to:

     ldi   ZH, high (Test_str*2)
     ldi   ZL, low  (Test-str*2)

See if that works.

Zack

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.