Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inline assembler call for subroutine

I have question about inline assembler. It's possible to call another assembler subroutine from inline assembler within the same function? For example:

void FindValidPID(unsigned int &Pid) 
{
    __asm
    {
        sub esp, 20h
        mov eax, Pid
        add eax,eax
        call sub123 ; another assm subroutine
        mov Pid, eax
        add esp, 20h
    }
}

Where I should, and how, write subroutine sub123?

Cheers,
Thomas

like image 549
Thomas Avatar asked Feb 08 '10 10:02

Thomas


1 Answers

If you are writing an entire subroutine in assembly, you should look into using the file-level assembler rather than inline.

like image 76
Potatoswatter Avatar answered Sep 23 '22 20:09

Potatoswatter