Hi I am new user of 8051 micro controller and keil vision2. I have problem with asm and endasm. I tried the example code for asm/endasm also. But it is giving EMBEDDED_C\ASSEMBLY\ADD.C(8): error C272: 'asm/endasm' requires src-control to be active for
Go to the C51 Manual and read the descriptions of ASM and ENDASM - they tell you precisely what to do.
Be sure to fully read the whole description.
Also, do a search here for ENDASM - inline assembler is often not a good way to proceed...
Read-Only
Author michael john
Posted 29-Jun-2004 05:44 GMT
Toolset C51
RE: problem with asm and endasm
michael john
Sample code in C51 Manual is also not working . It is also giving same error.
Read-Only
Author Jon Ward
Posted 29-Jun-2004 06:40 GMT
Toolset C51
RE: problem with asm and endasm
Jon Ward
Are you using the SRC directive?
Jon
Read-Only
Author michael john
Posted 29-Jun-2004 07:38 GMT
Toolset C51
RE: problem with asm and endasm
michael john
I am using SRC directive
From commandline It is working fine.
But I have problem with keilVison2
Read-Only
Author Andy Neil
Posted 29-Jun-2004 08:49 GMT
Toolset C51
RE: problem with asm and endasm
Andy Neil
You say, "I am using SRC directive", but in your original post you said,
"it is giving EMBEDDED_C\ASSEMBLY\ADD.C(8): error C272: 'asm/endasm' requires src-control to be active..."
This error message is specifically telling you that you have not used the SRC directive!
Read the Manual pages again - they give four bullet points telling you precisely what you must do.
Follow the four steps precisely and it will work!
Read-Only
Author Andy Neil
Posted 29-Jun-2004 08:51 GMT
Toolset C51
RE: problem with asm and endasm
Andy Neil
Better still, don't use inline assembler!
If you have stuff that really needs to be in assembler, then write it in assembler in an assembler source module.
Read-Only
Author Jon Ward
Posted 29-Jun-2004 15:59 GMT
Toolset C51
RE: problem with asm and endasm
Jon Ward
Take a look at the following knoweldgebase article.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.