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.
In ASM51, the following code is every useful:
-------- file1.asm --------- public MAX MAX EQU 10 -------- file2.asm --------- extrn number(MAX) MOV A,#MAX
-------- file2.C ----------- extern code MAX; #define MAX_NUMBER ((unsigned char)&MAX)
Place the #define in a header file and include the header file in c files that use MAX. for instance in file.h #define MAX 10 In file1.c and/or file2.c #include "file.h" if ( count < MAX )