Keil Logo Arm Logo

Discussion Forum

How to use assembler into C sourse code

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

Details Message
Read-Only
Author
Mishiev Gennady
Posted
4-Jun-2001 08:36 GMT
Toolset
C251
New! How to use assembler into C sourse code
Hi,everyone!
Help me, please, with my problem!
i'm working in Keil C251 compiler.
i have to use assembler code into C code
and i found in C251 user's manual directives "#pragma asm/endasm". but i can't compile this.
compiler writes:
" 'asm/endasm' requires src-control
to be active ".
May be i must to do anything for working with asm/endasm directives, what i dont know. Or may be i'm in wrong way.
Please, help me!
Gennady.
Read-Only
Author
Andrew Neil
Posted
4-Jun-2001 09:32 GMT
Toolset
C251
New! RE: How to use assembler into C sourse code
See the Thread "How to compiler (sic) *.src file?"

Look up the message in the Errors help file (click on the message in the build results window, then press F1).

You need to use the command-line option (or uVision option) to tell the Compiler to generate .src.
See the C251 manual documentation on "#pragma asm/endasm
Read-Only
Author
Andrew Kalenik
Posted
4-Jun-2001 12:10 GMT
Toolset
C251
New! RE: How to use assembler into C sourse code
Write in your C-file <#pragma SRC> before the first <#pragma ASM> entry.
Read-Only
Author
Andrew Neil
Posted
4-Jun-2001 13:43 GMT
Toolset
C251
New! RE: How to use assembler into C sourse code
That's right: like the error message said, and as the manual tells you, you must use the 'SRC' control for any 'C' source file which uses inline assembler.

You can place the 'SRC' control on the compiler command line, in a #pragma in the source file, or use the uVision dialogues.

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

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.