How about:

int dummyfunc () {}

asm void foo ()
{
         lea dummyfunc, a0
         move.l a0, d0
         rts
}

Rgds,
Jun-Kiat Lam
Metrowerks Technical Support

At 10:11 AM 8/9/2000 +0200, Petrus Wrang� wrote:
>Phu, this Motorola assembler isn't anything like the x86.
>I've been looking through Targeting PalmOS and Motorolas 68k
>Reference/Manuals but I dont get it to work.
>
>I have this function, like;
>
>void bogus(){
>         //some code
>}
>
>And then, in an asm function, I would like to use bogus as a variable to
>read from. The way I understand it, bogus is nothing more than an address.
>So, I whould like something like:
>
>asm void myFunc(){
>         move.l  bogus, d0       //I want the address of the bogus function
>in the d0 register.
>         //some more code..
>}
>
>
>How can I get this to work.
>
>BTW I'm using CW 5 with the 3.0sdk
>
>Thanks
>Petrus
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, 
>please see http://www.palmos.com/dev/tech/support/forums/


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to