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
If you want to write mixed program,you can write the header files like this:
//my.h #ifndef __MY_H__ #define __MY_H__ //Declaration extrn unsigned char bdata flags; sbit red_flag = flags^1;//Don't put this line to C source files #ifdef __C51__ //C function prototype void TextOut (BYTE byChar); #endif //__C51__ #endif //__MY_H__
;assem.asm #include "my.h" mov ... clr ... ...