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

trouble with C program and assembly subroutines

I have a main program that is is C and subroutines in assembly. I followed the example given on the keil website and it is throwing error a30 for the "RESEG" LINE. Can anyone see the error that I am making?

NAME TEMP_CHECK
?PR?temp_check SEGMENT CODE

PUBLIC TEMP_CHECK

RSEG ?PR?temp_check?TEMP_CHECK


TEMP_CHECK:
;
RET
END

Parents
  • Your RSEG line refers to a segment that you didn't actually define in a SEGMENT directive, before. In such cases, it's always best to ask the C compiler to show you what the correct layout for such a module would look like: write a dummy in C, tell the compiler to translate that to assembly (--> use SRC compiler option or #pragma), then fill in that template to actually implement it.

Reply
  • Your RSEG line refers to a segment that you didn't actually define in a SEGMENT directive, before. In such cases, it's always best to ask the C compiler to show you what the correct layout for such a module would look like: write a dummy in C, tell the compiler to translate that to assembly (--> use SRC compiler option or #pragma), then fill in that template to actually implement it.

Children