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

inline assembly help linker error

#include <reg5000.h>
#include <stdio.h>

void main(void);
void writebyte (unsigned char ch);


void main()
{
	unsigned char ch;
	ch=0x0A;
	writebyte(ch);
}

void writebyte (unsigned char ch)
{
	ACC=ch;

#pragma ASM
	PUSH	MCON
	ORL	MCON,	#4
	MOVX	@R0,	A
	DEC	R0
	POP	MCON
#pragma ENDASM

}

When compiling I get the following linker warning.

*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL
    SYMBOL:  ?C_STARTUP
    MODULE:  rtc-func.obj (RTC_FUNC)

I followed the directions in the manual about in-line assembly and the ASM/ENDASM directives which stated

Right click on the file in the Project Window - Files Tab
Choose Options for... to open Options - Properties page
Enable Generate Assembler SRC file
Enable Assemble SRC file.

I also tried adding the STARTINIT.A51 file and get the same linker warnings except that the warnings are in the STARTINIT.A51 file instead.

Any help out there? I know it has to be something simple...

Parents Reply Children
No data