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

Using Conditional Assembly Controls Externally?

Can conditional assembly controls be used externally? In other words, I have a set of assembly-time options that I select in the "application-level" portion of my assembly code. I'm trying to have one of the options, "LOW_SENSITIVITY_MICROPHONE", control which portion of code in a *separate module* gets assembled.

For example, in my application-level code, I have:

PUBLIC LOW_SENSITIVITY_MICROPHONE
$SET (LOW_SENSITIVITY_MICROPHONE = 1)

...and in a separate module I have:

EXTRN NUMBER (LOW_SENSITIVITY_MICROPHONE)
$IF (LOW_SENSITIVITY_MICROPHONE)
CODECMICREGEARPCS_LO EQU 0F1h
$ELSE
CODECMICREGEARPCS_LO EQU 91h
$ENDIF

However, when I try to assemble, I get an error of an undefined symbol on the line where I'm trying to declare LOW_SENSITIVITY_MICROPHONE as public. Is what I'm trying to do even possible?

Thanks.
Drew Rainwater

Parents Reply Children