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.
Hi, Where can I find the header files in C51. for instance: #include <Reg932.h> I need the ones for memory and I/O for instance: #include <memory.h> #include <io.h> those header files cannot be opened by C51. Thank you
"Platform-specific" just means that the headers are not part of ANSI standard C, and thus cannot be expected to exist on any platform on which you try to compile the code. You need to figure out which functions from memory.h and io.h are actually used by your code, and port those to your new platform. (The functions the compiler doesn't recognize when you take those #include directives out would be a good start.) io.h probably contains declarations for "in" and "out" functions for the 80x86 IO space. The 8051 does not have a separate IO space with special instructions. (What? The designers missed a chance to add yet another memory space in the 8051?) The code that used to move bytes to some device mapped into the 80x86 IO space will need to be rewritten to match your new hardware, whether SFRs or registers mapped into the xdata space. memory.h could be all sorts of things, depending on the code that you're starting with. Take a look at it in the original project and see what it does.