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

problem with asm and endasm

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

#include <reg51.h>
#include <stdio.h>

void main(void)
{
  #pragma asm
{
	MOV R0,#07h;
	MOV R1,#01h;
	MOV A,R0;
	ADDC A,R1;

	MOV A,9000h;
}
#pragma endasm

while(1);
}

 


Please help me how to use asm/endasm properly.