MPLAB ASM if statement help
Mike Mansheim email (remove spam text)
Given the below, I would like to put the 50hz.inc file if euro is 0
or put the 60hz.inc file if euro is 1 or any other value.
The problem is the thing puts 50hz.inc in with 1 but tries to
put both files if not zero and I get a dup label message.
ifdef EURO = 0
Bob already replied with the correct usage (if EURO == 0).
Just thought I'd mention that "ifdef" tests whether a symbol
has been defined at all (e.g. with #define or equ), and doesn't
care about any value that may have been assigned. So ifdef
could be used - you would just have to comment and uncomment
the definition of EURO.
By the way, wouldn't mpasm just kick "EURO = 0" used with ifdef
as an illegal label?
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/languages.htm?key=mplab
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the