The @ ifdef statements only work during assembly, but that's AFTER the PBP program has been compiled.
So it can't directly affect PBP variables.
However, in ASM you can undefine bit variables and re-define them, which has pretty much the same effect.
Code:
Key VAR PORTB
EnterKey VAR BIT EXT :@ #undefine EnterKey
StopKey VAR BIT EXT :@ #undefine StopKey
StartKey VAR BIT EXT :@ #undefine StartKey
ASM
ifdef Devboard
#define EnterKey _Key,0
#define StopKey _Key,1
#define StartKey _Key,2
else
#define EnterKey _Key,2
#define StopKey _Key,0
#define StartKey _Key,1
endif
ENDASM
Bookmarks