I’m trying to port some 8051 code originally written in assembly to C using SDCC.  I’ve been trying to pick my battles, reusing some of the code a inline assembly, and rewriting other parts totally in C.  My question is can an inline assembly function (this one is a rather complex ISR routine) call another function that has been written in C using SDCC?  I’ve tried something like this:

 

void myfunc(void)

{

    //some code

}

 

void my_ISR(void)

{

    _asm

    call _myfunc

    _endasm;

    return;

}

 

Which results in this error: “.org in REL area or directive / mnemonic error

 

Thanks,

Aaron