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: Gre7g Luterman
Subject: Re: [avr-gcc-list] Assembly language help
Date: Sat, 28 Jul 2007 10:49:15 -0700 (PDT)

--- Parthasaradhi Nayani <address@hidden>
wrote:

> Hello Group,
> 
> I am writing an assembly language function in which
> I need to get the address of a sub-routine into a
> register pair. How can I do it? A sample code is
> given below.

func1:
    nop
    nop
    ldi   r24, lo8(label1)
    ldi   r25, hi8(label1)
    asr   r25               ; convert byte addr
    ror   r24               ; to word addr
    nop
    nop

label1:
    nop
    nop

HTH,
Gre7g


       
____________________________________________________________________________________Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/




reply via email to

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