This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Combining C and assembly codes into one header file.

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 ;))

0