Yahoo Groups archive

AVR-Chat

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

Message

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

2005-06-15 by John Samperi

At 05:20 AM 16/06/2005, you wrote:
>My string is actually in the code space, which is fine since
>right now I just need it to be in someplace.

 >.dseg
 >Test_str:
?    .db      "The old brown fox jumps over the lazy dog."
 >    .db      0x0d, 0x0a, 0


I think you are confused. You CANNOT store your string
in ram that way. You can use either .cseg and put it in
flash and then use the LPM instruction as others have
pointed out.

You can put into EEPROM using .eseg and then use an EEPROM
reading routine to get it out of EEPROM.

OR

You can put it in flash as above, copy it to ram at run
time and THEN use ld    r16,Z+ to retrieve it. At present
you are to reading from ram that may not be there
(i.e. 0xff data)



Regards

John Samperi

******************************************************
                         Ampertronics Pty. Ltd.
   11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
          Tel. (02) 9674-6495       Fax (02) 9674-8745
                Email: samperi@ampertronics.com.au
                  Website  http://www.ampertronics.com.au
* Electronic Design   * Custom Products   * Contract Assembly
******************************************************

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.