User`s guide

Inline Assembly Language and Intrinsics
Intrinsic Functions
181Targeting MC56F83xx/DSP5685x Controllers
__mod_access
Retrieve the modulo pointer. The __mod_access function returns the modulo pointer
value specified by <mod_desc> in the R2 register, as per calling conventions. The
value returned is a byte address. The data in the modulo buffer may be read or written
by a cast and dereference of the resulting pointer.
Prototype
void *__mod_access( int <mod_desc>);
Example
Assign a value to the modulo buffer at the current pointer.
*((char *)__mod_access(0)) = (char)i;
__mod_update
Update the modulo pointer. The __mod_update function updates the modulo pointer
by the number of data type units specified in <amount>. <amount> may be negative.
Of course, the pointer will wrap to the beginning of the modulo buffer if the pointer is
advanced beyond the modulo boundaries. <amount> must be a compile time constant.
Prototype
void __mod_update( int <mod_desc>, int <amount>);
Example
Advance the modulo pointer by 2 units.
__mod_access(0, 2);
__mod_stop
Reset modulo addressing to linear addressing. This function writes the modulo control
register with a value which restore linear addressing to the R0 and R1 pointer registers.