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 Leon Heller

----- Original Message ----- 
From: "Alex De Lara" <alex_de_lara@yahoo.com>
To: <AVR-Chat@yahoogroups.com>
Sent: Wednesday, June 15, 2005 1:43 AM
Subject: [AVR-Chat] This assembly oughta be something silly...


> 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 ? 

IIRC, you have to multiply the string address by two:

  ldi     ZH,high(Test_str*2)  ; Load Z register high    
    ldi     ZL,low(Test_str*2)   ; Load Z register low

There is an app. note on this.

Leon



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.7.3/15 - Release Date: 14/06/2005

---
[This E-mail has been scanned for viruses but it is your responsibility 
to maintain up to date anti virus software on the device that you are
currently using to read this email. ]

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.