Z88 Developers' Notes
Contents   Contents of System Calls

OS_Erh, set error handler

RST 20H, DEFB $75


     A = 0, other values reserved for system use
     B = 0
     HL = address of new error handler
     HL = 0, use default system error handler (in lower 8K of segment 0)
     Fc = 0
     A = old call level
     HL = address of old error handler
Registers changed after return:
     ...CDE../IXIY same
     AFB...HL/.... different
Make sure that the error handler is not paged out of the corresponding segment, when calling OZ. If an error occurs random information will be executed, since the original code of the particular bank has been paged out.

Related calls:

GN_Err, display an interactive error box
GN_Esp, return an extended pointer to a system error message
OS_Erc, get error context
OS_Esc, examine special condition