I'm trying to call an asm function from C source without success. Do I make some mistake? In the attachment there are the project files.
Have a nice day
My 8051 IAR compiler puts a lot more assembler stuff around its assembler functions that are to be integrated with a C source. It looks like you are missing all the assembler defines and setups so the linker can match this function to the IAR C calling convention.
Did you read the chapter in the manual regarding interfacing C and assembler? The recommended, simplest way is to create a dummy function in C with all the input parameters and return value, compile this and then modify the generated assembler code. I haven't had any trouble doing it that way.
admin's test signature
I found the way: the option "Disable embedded C++ syntax" (Project->Options->ICCAVR->Language) was not set.
© 2020 Microchip Technology Inc.