Hi, below is the code snippet I am using to try out calling as asm func from a C module. What happens is the asmtest func occupies memory location 0000h and C startup code is unable to execute correctly. How can I relocate the asm func to some other location ? ; in asm file asmtest: MOV A, #64 MOV R0,#16 INC A RET END ----------------------- // in C module #include <reg52.h> extern void asmtest(void); void main() { char i = 2; asmtest(); } -----------------------
Tip: create a dummy function, then get the compiler to generate the assembler and use this as the "skeleton" for your own code.