$RESERVED RAM | EEPROM - Specify a memory region as unusable

$RESERVED RAM | EEPROM - Specify a memory region as unusable

Language reference ›› Directives ››
Parent Previous Next

reserved-directive = $RESERVED ( RAM | EEPROM ) reserved-area { "," reserved-area } .
reserved-area = address-expression [ ( TO | ".." ) address-expression ] .


Defines a RAM or EEPROM address or block of consecutive addresses that are not usable by PMP.


This directive may be used several times to define more than one area, or different areas may be defined in one directive, separated by a comma.

If an address is already used by PMP or does not exist, an error occurs.




{$RESERVED RAM $100, $110 TO $11F comment: reserved for XYZ module }
{$RESERVED EEPROM $10, $11, $F0..$FF}
CONST
 MOD2_RAM_START = $200;
 MOD2_RAM_LENGTH = $10;
{$RESERVED RAM MOD2_RAM_START TO MOD2_RAM_START + MOD2_RAM_LENGTH - 1 }