28.2.130 __builtin_tbladdress

Architecture

dsPIC33C/E/F, dsPIC30

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; otherwise an error message is produced and the compilation fails. See the space attribute in 9.10 Variable Attributes.

Prototype

uint32_t __builtin_tbladdress(const void *p);

Argument

p - literal address of an object

Return Value

Returns an uint32_t value that represents the address of an object in program memory.

Assembler Operators

tbloffset
tblpage

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:

uint32_t page = __builtin_tbladdress(&obj);