PMP defines some system pseudo constants and variables:
FALSE |
LOW(BOOLEAN); ORD(FALSE) = 0. |
TRUE |
HIGH(BOOLEAN); ORD(TRUE) = 1. |
NIL |
Pointer to nothing; ORD(NIL) = 0. |
MAXINT |
HIGH(INTEGER) = 32 767 = $7FFF. |
MININT |
LOW(INTEGER) = -32 768 = $8000. |
MAXWORD |
HIGH(WORD) = 65 535 = $FFFF. |
MINWORD |
LOW(WORD) = 0. |
MAXLONGINT |
HIGH(LONGINT) = 2 147 483 647 = $7FFF FFFF. |
MINLONGINT |
.LOW(LONGINT) = -2 147 483 648 = $8000 0000. |
MAXLONGWORD |
HIGH(LONGWORD) = 4 294 967 295 = $FFFF FFFF. |
MINLONGWORD |
LOW(LONGWORD) = 0. |
MAXBIGINT |
HIGH(BIGINT) = 9 223 372 036 854 775 807 = $7FFF FFFF FFFF FFFF |
MINBIGINT |
LOW(BIGINT) = -9 223 372 036 854 775 808 = $8000 0000 0000 0000. |
MAXBIGWORD |
HIGH(BIGWORD) = 18 446 744 073 709 551 615 = $FFFF FFFF FFFF FFFF. |
MINBIGWORD |
LOW(BIGWORD) = 0. |
PI |
The value of PI, in the maximum PMP's FP precision (REAL format) that gives a 32-bit mantissa plus the sign bit. This is a true constant, not a computed value. |
FREQUENCY |
This constant returns the current selected processor frequency in Hz. |
VERSION |
This constant returns the PMP compiler version in a numerical form. This is especially useful in $IF conditional defines to compile for specific PMP versions (mainly to workaround bugs or prepare future compatibility). If the version is Major.Minor.Revision, the returned value is: Major * 1000 + Minor * 100 + Revision. e.g.: V2.1.12 returns 2112, V2.0.6 returns 2006. This is slightly different from the standard TP or Delphi that defines a conditional symbol like VERxxx. |
VERSION_MAJOR |
NEW! (V2.1) This constant returns the PMP compiler major part of its version in a numerical form. e.g.: V2.1.0 returns 2. |
VERSION_MINOR |
NEW! (V2.1) This constant returns the PMP compiler minor part of its version in a numerical form. e.g.: V2.1.0 returns 1. |
VERSION_REVISION |
NEW! (V2.1) This constant returns the PMP compiler revision part of its version in a numerical form. e.g.: V2.1.0 returns 0. |
VERSION_BUILD |
NEW! (V2.1) This constant returns the PMP compiler build part of its version in a numerical form. e.g.: V2.1.0.28 returns 28. |
VERSION_STRING |
Compiler version string as 'Major.Minor.Revision'. |
PROJECT_VERSION_MAJOR |
NEW! (V2.1) This constant returns the Project's major part of its version in a numerical form. e.g.: V1.2.3.4 returns 1. |
PROJECT_VERSION_MINOR |
NEW! (V2.1) This constant returns the Project's minor part of its version in a numerical form. e.g.: V1.2.3.4 returns 2. |
PROJECT_VERSION_REVISION |
NEW! (V2.1) This constant returns the Project's revision part of its version in a numerical form. e.g.: V1.2.3.4 returns 3. |
PROJECT_VERSION_BUILD |
NEW! (V2.1) This constant returns the Project's build part of its version in a numerical form. e.g.: V1.2.3.4 returns 4. |
PROJECT_VERSION_STRING |
NEW! (V2.1) Compiler version string as 'Major.Minor.Revision'. |
IDLOCS[<index>] |
This pseudo array returns or sets the defined user ID value of <index> that is a constant expression evaluated as 0..n, depending on the processor. On some processors this pseudo variable is writable. On small processors (say: BASELINE) this pseudo array is not readable: in this case PMP uses values defined at compile time, otherwise the current user ID is read from the code flash memory. For compatibility with older versions of PMP, IDLOC is maintained as an alias of IDLOCS. |
MEMAVAIL |
This variable (read only) returns the currently available dynamic memory (heap), in bytes. Dynamic memory is implemented for PIC18 and PIC16 enhanced only. |
INSTR_TIME |
REAL - Instruction duration in µs. |
INSTR_TIME_NS |
REAL - Instruction duration in ns. |