avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Inline assembler question


From: Iztok Zupet
Subject: Re: [avr-gcc-list] Inline assembler question
Date: Tue, 17 Jun 2003 09:30:04 +0200
User-agent: KMail/1.4.3

On Tuesday 17 June 2003 09:14, Marko Panger wrote:
> Hi Iztok,
>
> I think the meaning is not the same. I don't want to load the content of a
> variable, but the address of a variable.

Sorry, then do:

unsigned int myVar;
                ...
        asm volatile (
                "ldi r30,lo8(myVar)\n"
                "ldi r31,hi8(myVar)\n"
        );

This will load the memory address into the desired register pair.

Iztok



reply via email to

[Prev in Thread] Current Thread [Next in Thread]