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

How to compile the program,please help me

 
/*******************************************/
/*Name:Main Function                      */
/* Memory model: LARGE                     */
unsigned char  Temp;
unsigned char  *pTemp;

void func(void);

void main(void)
{	
	unsigned char  i = 6;
 
	pTemp = &Temp;
	
	*pTemp = 98;
	
	func();
	i = *pTemp;

}
/*************************************************/
/*--------------------------------------
compile following program to assembly , 
then link with the main function.No Error! But the " i " cannot get the number "0xdd".
Why and how to chang the assembly .
please help me,thank you.!
------------------------------------------*/
#pragma src(MYPTR.A51) large

extern unsigned char  *pTemp;
void func(void)
{	
	*pTemp = 0xdd;
}

0