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.
I create a C51 project and write just one A51 subroutine(for speed).I define some SFR in the header file just like sbit FLASH_CS = P1^1; sbit A19 = P3^5; sbit A18 = P3^4; sbit A17 = P3^3; sbit A16 = P3^2; How can I declare them in the A51 subroutine?It seems that the EXTRN directive can't help me!
I seem to remember that when you do this in C51, you have to use 'sbit' in the definition, but just 'bit' in the extern declaration. Check in the C51 Manual. Maybe A51 is similar? Check in the A51 Manual. Doesn't A51 just take C51 header files? Check in the A51 Manual.
Mr.Andrew Neil: Thank you for help.But the A51 statment EXTRN BIT (FLASH_CS) doesn't work.Keil C tell me that FLASH_CS is unresolved external symbol.How can I use the C header file directly?Does A51 have an include directive?Beg your help.Many thanks!
The A51 can support the #include statment!It's impossible in MASM.I have done it.Many thanks.
"Does A51 have an include directive" Check in the A51 Manual
"Keil C tell me that FLASH_CS is unresolved external symbol" That's not 'C' (the Compiler) - that's the Linker telling you. That means that you have external declaration(s) without a public definition