simple inline asm question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
GLneo

simple inline asm question

Post 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 '*'
AR

Re:simple inline asm question

Post 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"
Post Reply