28.2.39 __builtin_edsoffset
Architecture
dsPIC33C/E/F, dsPIC30
Description
Returns the eds page offset 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 9.10 Variable Attributes.
Prototype
uint16_t __builtin_edsoffset(const void *p);
Argument
p
– literal address of an object
Return Value
Returns the eds page number offset of the object whose address is given as a parameter.
Assembler Operator
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:
uint16_t page = __builtin_edsoffset(&obj);