Set up a modulo error variable. This function registers a static integer address to hold the error results from any of the modulo buffer API calls. The function returns 0 if it is successful, 1 otherwise. The argument must be the address of a static, global integer variable. This variable holds the result of calling each of the previously defined API functions. This allows the user to monitor the status of the error variable and take action if the error variable is non-zero. Typically, use __mod_error during development and remove it once debugging is complete. __mod_error generates no code, although the error variable may occupy a word of memory. A non-zero value in the error variable indicates a misuse of the one of the API functions. Once the error variable is set it is reset when __mod_stop is called. The error variable contains the error number of the last error. A successful call to an API function does not reset the error variable; only __mod_stop resets the error variable.
int __mod_error( int * <static_object_addr>);
Register the error number variable
static int myerrno; assert( __mod_error(&myerrno) == 0 ) ;