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 want to include an assembly include file in a C file I am not able to do so using pragma
I tried the following -------------------------------------------- ;File1.asm TEST_MACRO MACRO mov a, r0 ENDM
//File2.c #pragma asm #include "file1.inc" #pragma endasm
--------------------------------------------- void main() { #pragma asm TEST_MACRO #pragma endasm
}
With this I cannot compile file2.c The src file formed is ------------------------------------------------------- //file2.src NAME FILE2
?PR?main?FILE2 SEGMENT CODE EXTRN CODE (?C_STARTUP) PUBLIC main ; #pragma asm #include "file1.inc" #pragma endasm
void main() { #pragma asm
RSEG ?PR?main?FILE2 main: ; SOURCE LINE # 5 ; SOURCE LINE # 6 ; TEST_MACRO TEST_MACRO ; #pragma endasm ; ; } ; SOURCE LINE # 11 RET ; END OF main
END --------------------------------------------------------
Error is Cant open file name File1.asm
The #pragma endasm is not detected by the preprocessor
Please help.
Regards, Gaurav