# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MPLAB XC16 C-Compiler

- 1
- 2
…
- 307
- 308
- 309
- 310
- 311
…
- 365
- 366

Built-in Functions
 2012-2013 Microchip Technology Inc. DS50002071C-page 309
__builtin_edspage
Description: Returns the eds page number of the object whose address is given as a parameter. The
argument p must be the address of an object in an Extended Data Space (EDS); otherwise
an error message is produced and the compilation fails. See the space attribute in
Section 2.3.1 Specifying Attributes of Variables.
Prototype: unsigned int __builtin_edspage(const void *p);
Argument: p object address
Return Value: Returns the eds page number of the object whose address is given as a parameter.
Assembler Operator/
Machine Instruction:
edspage
Error Messages The following error message is produced when this function is used incorrectly:
Argument to __builtin_edspage() is not the address of an object in extended data
space.
The argument must be an explicit object address.
For example, if obj is object in an executable or read-only section, the following syntax is
valid:
unsigned page = __builtin_edspage(&obj);
__builtin_edsoffset
Description: Returns the eds page offset of the object whose address is given as a parameter. The argu-
ment p must be the address of an object in an Extended Data Space (EDS); otherwise an
error message is produced and the compilation fails. See the space attribute in
Section 2.3.1 Specifying Attributes of Variables.
Prototype: unsigned int __builtin_edsoffset(const void *p);
Argument: p object address
Return Value: Returns the eds page number offset of the object whose address is given as a parameter.
Assembler Operator/
Machine Instruction:
edsoffset
Error Messages The following error message is produced when this function is used incorrectly:
Argument to __builtin_edsoffset() is not the address of an object in extended data
space.
The argument must be an explicit object address.
For example, if obj is object in an executable or read-only section, the following syntax is
valid:
unsigned page = __builtin_edsoffset(&obj);
__builtin_enable_interrupts
Description: Enable the specified interrupts.
Prototype: void __builtin_enable_interrupts(unsigned int interrupt);
Argument: interrupt Interger value specifying the interrupt to enable.
Return Value: None.
Assembler Operator/
Machine Instruction:
enable_interrupts
Error Messages None.

- 1
- 2
…
- 307
- 308
- 309
- 310
- 311
…
- 365
- 366