This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

calling assembly routine from C in UV2

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();
}

-----------------------

Parents Reply Children