Discussion Forum

UNRESOLVED EXTERNAL SYMBOL

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Venkat Vaggu
Posted
14-May-2007 21:57 GMT
Toolset
C51
New! UNRESOLVED EXTERNAL SYMBOL

When I compile following simple Code I will get L1 error, Please let me know what's the wrong with this code:

#include <reg51.h>
void main(void)
{ #pragma asm NOP NOP NOP
#pragma endasm
}

*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_STARTUP

Read-Only
Author
Andy Neil
Posted
14-May-2007 22:30 GMT
Toolset
C51
New! Just don't do it!

http://www.keil.com/support/docs/1980.htm

Don't do inline assembler.
If you really need parts of your project in assembler, create separate assmebler modules and call them from 'C'.

Read-Only
Author
Venkat Vaggu
Posted
14-May-2007 22:43 GMT
Toolset
C51
New! RE: Just don't do it!

Thanks, I didn't found given link in my search.

Read-Only
Author
Neil Kurzman
Posted
15-May-2007 07:08 GMT
Toolset
C51
New! RE: Just don't do it!

for nop
there is a NOP macro, no inline is needed for that

Read-Only
Author
Andy Neil
Posted
15-May-2007 07:36 GMT
Toolset
C51
New! NOP - Intrinsic Function

"there is a NOP macro"

It's called an "Intrinsic Function" in the Manual.

See http://www.keil.com/support/man/docs/c51/c51_lib_intrinsic.htm for the full list.

See also http://www.keil.com/forum/docs/thread9886.asp

Next Thread | Thread List | Previous Thread Start a Thread | Settings