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

Sharing #defines and EQU statements

Does anyone know if there is a way to make a #define in 'C' visible to A51 code (or visa-versa)? I know how to make a header file in Hi-Tech C51 that will let 'C' and 'A51 definitions coexist, but can't figure out how to this with Keil.

In Hi-Tech's C51 compiler you can create a common ('C' and 'A51') header file like this:

; #define C_1 1
; #define C_2 2
; #define C_3 3

;#if (0)
ASSEM_1 EQU 1
ASSEM_2 EQU 2
ASSEM_3 EQU 3
;#endif

But when I try this in Keil it chokes on the ; before the #define.

Any ideas?

0