Inline Assembler

Here's a simple example of a program:

int main ()
{
__asm {
call label
jmp end
label:
mov ecx,4
ret
end:
}

return 1;
}

The problem is: i want to have label as a global label that can be called from multiple functions. The thing is: it won't let you put labels outside of functions, and I CANNOT use it as an __asm block inside of another c function. Example of something kind of what I want (this doesn't work of course):

__asm {
label:
mov ecx,4
ret
}

int main ()
{
__asm {
call label
}

return 1;
}

Please tell me if there is a way to do something with the same effect (BUT NOT AS A C FUNCTION)

Dave2001,
Dave2999@hotmail.com
[819 byte] By [Dave2001] at [2007-11-17 11:50:02]
# 1 Re: Inline Assembler
I don't think you can do it like that.

The best way is to incorporate the assembly into a function...then call the function with inline.
bkenwright at 2007-11-10 8:06:56 >