Hi,
I use CCSv4 and I need a common header file included in C and assembler modules. The part that I need is a kind of macro that contains (is translated to) assembler instructions.
for example:
File: header.h
#define R45 \
asm( " pop r4");\
asm(" pop r5");
When I include it into C, e.g. file module.c:
#include "header.h"
and use R45 macro in the C funtion macro, the asm code is inserted properly.
Unfortunatelly, when I try to use the same header to be included in assembler module, lets's call it module_a.asm by:
.cdecls C,"header.h"
The R45 symbol cannot be exchanged to the macro contents (i.e. two instructions: pop r4 pop r5).
Is it possible to have such common part of the code for C and assembler?
Regards,
Piotr Romaniuk, Ph.D.
ELESOFTROM