Vault 7: Projects

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

Built-in Functions
2012-2013 Microchip Technology Inc. DS50002071C-page 323
__builtin_tbladdress
Description: Returns a value that represents the address of an object in program memory. The argument
p must be the address of an object in an EE data, PSV or executable memory space; other-
wise an error message is produced and the compilation fails. See the space attribute in
Section 2.3.1 Specifying Attributes of Variables.
Prototype: unsigned long __builtin_tbladdress(const void *p);
Argument: p object address
Return Value: Returns an unsigned long value that represents the address of an object in program
memory.
Assembler Operator/
Machine Instruction:
tbladdress
Error Messages The following error message is produced when this function is used incorrectly:
Argument to __builtin_tbladdress() is not the address of an object in code, psv, or
eedata section.
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 long page = __builtin_tbladdress(&obj);
__
builtin_tblpage
Description: Returns the table page number of the object whose address is given as a parameter. The
argument p must be the address of an object in an EE data, PSV or executable memory
space; 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_tblpage(const void *p);
Argument: p object address
Return Value: Returns the table page number of the object whose address is given as a parameter.
Assembler Operator/
Machine Instruction:
tblpage
Error Messages The following error message is produced when this function is used incorrectly:
Argument to __builtin_tblpage() is not the address of an object in code, psv, or eed-
ata section.
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_tblpage(&obj);

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh