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!
At school we are going to have the final test in programming. Most of the class are really good at programming at C and Assembly therefore teachers allowed us to create universal header file with some functions for peripheries we are going to use. We have created header files for almost everything we need. There is just one little question. In one of the files we use C and Asm code we are using separate *.A51 file. Is there a way to put it into this header file? (We are creating one universal file with preprocessor directives and we want to stick to just this one file).
SO again questions:
1. Can we create something like this:
type FunctionInC(type foo) { #pragma asm JMP $ ; #pragma endasm }
(Because we are reading lots of articles against it.)
2. Is there any other way to put it together? (Everything else is in C but 3 functions need "direct supervision")
Please excuse my English (I am still not on level I want to be ;))
if C
#define CFILE
That's really quite unnecessary. Since such headers are totally platform-specific anyway, might as well use the predefined macros of the platform instead of rolling your own:
__C51__ Version number of the compiler (for example, 701 for version 7.01). __CX51__ Version number of the compiler (for example, 701 for version 7.01).
__A51__ Version number of the A51 Assembler (for example, 710 for version 7.10). __AX51__ Version number of the AX51 Assembler (for example, 212 for version 2.12.