PDA

View Full Version : Determining LONG compiler



Charles Linquis
- 9th September 2011, 19:23
In the 2.6x versions of the compiler, you set a switch to choose PBP or PBPL.

If there were no LONGS in your pogram, you could still compile with PBPL, and it didn't tell you.

I think I remember someone telling me that I could put an ASM block - something like

ASM

ifdef PBPL_USED
LIST
....
NOLIST
endif

ENDASM

But I can't remember the details. Could someone please refresh my (failing) memory on how to detect if the PBPL compiler has been used, or block it from compiling at all if I try to use PBPL?

Darrel Taylor
- 9th September 2011, 23:49
PBP 2.50/2.60/PBP3


ASM
if ((R1-R0) == 4)
error "Compiled with PBPL"
endif
ENDASM


PBP3 only (faster)


#IF __LONG__ = 1
#ERROR "Compiled with PBPL"
#ENDIF

The second one is faster because PBP picks up the error.
The first one has to go through the assembly process before you get the error.

Charles Linquis
- 10th September 2011, 19:19
So my next question is --

Is there some trick that I can use that will automatically invoke PBP if no LONGs are declared, and invoke PBPL if they are?