As you use modulo buffer intrinsic functions, keep these points in mind:
- You must align modulo buffers properly, per the constraints that the
M56800E User's Manual explains. There is no run-time validation of alignment. Using the modulo buffer API on unaligned buffers will cause erratic, unpredictable behavior during data accesses.
- Calling
__mod_start() to write to the modulo control register effectively changes the hardware's global-address-generation state. This change of state affects all user function calls, run-time supporting function calls, standard library calls, and interrupts.
- You must account for any side-effects of enabling modulo addressing. Such a side-effect is that R0 and R1update in a modulo way.
- If you need just one modulo pointer is required, use the R0 address register. Enabling the R1 address register for modulo use also enables the R0 address register for modulo use. This is true even if
__mod_init() or
__mod_initint16() have not explicitly initialized R0.
- A successful API call does not clear the error code from the error variable. Only function
__mod_stop clears the error code.