Does anyone know a way to define C preprocessor comments at the command line for A51? For example, in C I would do something like: C51 foo.c DEFINE(SOME_CONST) but the "DEFINE" directive does not work in A51. In addition, the C preprocessor in A51 does not recognize constants declared with the "SET" directive as C defined constants. In other words, if I do: A51 foo.a51 SET(SOME_CONST=1) and then I have the following line in my assembly file: #ifdef SOME_CONST the expression will be interpreted as being false. Thanks!
I can't get it to work either, but I found a couple workarounds that may help: A51 foo.a51 SET(SOME_CONST=1) $IF (SOME_CONST = 1) SOME_CONST SET 1 ;;...more code $ELSE SOME_CONST SET 0 ;;...more code $ENDIF The $IF tests use the command-line SET variables, so you might just use them instead of #ifdef. Also, if you want to use the variables in other assembler expressions, then the assembler "SET" statements get you a named variable you can use, e.g.: TABLE db SOME_CONST