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: Parthasaradhi Nayani
Subject: Re: [avr-gcc-list] Assembly language help
Date: Sun, 29 Jul 2007 19:50:09 -0700 (PDT)

Hello Erik Christiansen,

Thanks for the reply. This is something new I have learnt today!!! I had, some time ago, come across LO (x) and HI (x) but now sieving through codes and googling around have not found the same. Can you throw some light on this as well. Thanks in advance.

Regards
Nayani

Erik Christiansen <address@hidden> wrote:
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



_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
reply via email to

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