We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Gentlemen: I wanna use a bit variable in file:assem.asm.And the bit variable is defined in another file:main.c;Just as follows:
in main.c unsigned char bdata flags; sbit red_flag = flags^1; in assem.asm
Sorry,John.Now I have compiled it successfully.It will be right,I think.
//my.h #ifndef __MY_H__ #define __MY_H__ //Declaration #ifdef __A51__ EXTRN DATA (flags) EXTRN BIT (red_flag) #else extern unsigned char bdata flags; extern bit red_flag; #endif #ifdef __C51__ //C function prototype void TextOut (BYTE byChar); #endif //__C51__ #endif //__MY_H__
//my.c unsigned char bdata flags; sbit red_flag = flags^1;