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

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

Re: [avr-gcc-list] Assembly language help


From: Erik Christiansen
Subject: Re: [avr-gcc-list] Assembly language help
Date: Mon, 30 Jul 2007 11:54:02 +1000
User-agent: Mutt/1.5.9i

On Sat, Jul 28, 2007 at 09:00:08PM -0700, Parthasaradhi Nayani wrote:
>     ldi   r24, lo8(label1)
>     ldi   r25, hi8(label1)
>     asr   r25               ; convert byte addr
>     ror   r24               ; to word addr

Fine to begin with, but if you try:

     ldi   r24, pm_lo8(label1)
     ldi   r25, pm_hi8(label1)

there is no need to perform the run-time address conversion. :-)

If there is a lot of assembler in your future, then a pair of macros can
make life easier.
     
Erik





reply via email to

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