$POINTERS | $P - Define pointers size

$POINTERS | $P - Define pointers size

Language reference ›› Directives ››
Parent Previous Next

pointers-directive = ( $POINTERS | $P ) pointers-mode .
pointers-mode = pointers-large | pointers-small .
pointers-large = LARGE | "L" .
pointers-small = SMALL | "S" .


Define pointers and by-address parameters byte size.



<pointers-small>:

Optimize for using one-byte pointers and VAR arguments (this is default); this method limits allocation of pointed to variables in the lowest 256 bytes of memory.

PMP does not search to optimize space for such variables.

This directive cannot be used after code has been generated.

This directive is only available in a program (project wide directive); units will be automatically compiled with the same option as the main program.
This directive is ignored for HIGHPERF and ENHANCED processors, for witch pointers and VAR argument addresses are always 16-bit wide (LARGE). A warning will be issued and the $POINTERS LARGE will remain active.


<pointers-large>:

Optimize for using two-bytes pointers and VAR arguments; this method permits allocation of such variables in the whole memory, but code is less efficient since parameter passing consumes more memory and code and the use of FSR must be coupled with the use of IRP flag.

PMP does not search to optimize space for such variables. This directive is ignored for small devices that have not more than 256 bytes of memory. This directive cannot be used after code has been generated. This directive is only available in a program (project wide directive); units will be automatically compiled with the same option than the main program.
This directive is not allowed for HIGHPERF and ENHANCED processors, for witch pointers and VAR argument addresses are always 16-bit wide.

This directive is ignored for processors that have no upper ram (all ram is within 0..255 address range). A warning will be issued and the $POINTERS SMALL will remain active.


This directive overrides the default option defined in the Project's Options.


{$POINTERS LARGE}