<< Previous | Next >>

defineErrorHandler

void defineErrorHandler( void * errfcn );

Description

Sets the BIOS function pointer for runtime errors to the function pointed to by errfcn. This user-defined function must be in root memory. Specify root at the start of the function definition to ensure this. When a runtime error occurs, the following information is passed to the error handler on the stack:

Stack Position

Stack Contents

SP+0 Return address for exceptionRet
SP+2 Error code
SP+4 0x0000 (can be used for additional information)
SP+6 XPC when exception() was called (upper byte)
SP+8 Address where exception() was called

Parameters

errfcn
Pointer to user-defined run-time error handler.

Library

SYS.LIB


Dynamic C Functions << Previous | Next >> rabbit.com