typedef void (*voidFunc)(void); unsigned char g_var; void myCLI(void); void interRoutineAsm(void); void interRoutineC(void) { g_var++; } void main() { g_var = 0xff; *((voidFunc *) 0x3ff2) = interRoutineAsm; myCLI(); while(1) *((unsigned char*)0x400) = g_var; }