#include <nitro/cp.h>
s64 CP_GetDivRemainder64( void );
s32 CP_GetDivRemainder32( void );
s16 CP_GetDivRemainder16( void );
s8 CP_GetDivRemainder8( void );
s64 CP_GetDivRemainderImm64( void );
s32 CP_GetDivRemainderImm32( void );
s16 CP_GetDivRemainderImm16( void );
s8 CP_GetDivRemainderImm8( void );
None.
Returns the remainder from the division operation.
This function returns the remainder from the division operation. The results can be acquired in 8-bit, 16-bit, 32-bit, or 64-bit formats. The results can be acquired in a smaller bit format than generated by the calculation, but the value may not be accurate. (For example, if the remainder 0x100 is acquired in s8 format, the result will be 0x0.) Functions that wait for the change from the busy state to the ready state and functions that are in the ready state and do not wait are provided separately.
Functions | Return Value Type | Wait State |
CP_GetDivRemainder64 |
s64 | Wait |
CP_GetDivRemainder32 |
s32 | Wait |
CP_GetDivRemainder16 |
s16 | Wait |
CP_GetDivRemainder8 |
s8 | Wait |
CP_GetDivRemainderImm64 |
s64 | No Wait |
CP_GetDivRemainderImm32 |
s32 | No Wait |
CP_GetDivRemainderImm16 |
s16 | No Wait |
CP_GetDivRemainderImm8 |
s8 | No Wait |
References the value of
DIVREM_RESULT(0x40002a8)
of the IO register.
References DIVCNT(0x4000280)
to check the ready state.
CP_SetDivImm*, CP_SetDiv*, CP_IsDivBusy, CP_WaitDiv, CP_GetDivResult*
01/09/2004 Added content
12/01/2003 Initial Version