Page 1 of 1

simple inline asm question

Posted: Thu Jun 30, 2005 5:32 pm
by GLneo
i'm not too good with inline asm(gcc) and i can't find the problem with:

Code: Select all

void jmp(void *prog)
{
    asm volatile ("jmp %0" : : "m" (prog));
}

void call(void *prog)
{
    asm volatile ("call %0" : : "m" (prog));
}
wend i compile i get:

Code: Select all

Warning: indirect jmp without '*'
Warning: indirect call without '*'

Re:simple inline asm question

Posted: Fri Jul 01, 2005 3:19 am
by AR
Can I ask what exactly the point of those are? Why do you need to manually jump and call?

The error means that you aren't dereferencing what is supposedly a memory location to get the jump/call address from (IIRC), change "m" to "r"