TITLE "Z33INVER - Z3lib 4.0" ;================================================================= ; Copyright (C) 1989 by Jay Sage. Permission granted to ; Alpha Systems Corp. to distribute with The Libraries, Version 4 ;----------------------------------------------------------------- ; Author : Jay Sage. Modified by Harold F. Bower ; Date : 4/10/88 ; Version : 1.0 ; Module : Z33INVER ; Abstract: This module contains the routine INVERROR which sets up ; the message buffer for a return to the error handler. A flag ; is passed on entry which is zero if an internal error is ; signalled, otherwise, an external error is signalled. The ; error code is passed for external errors. No care is taken ; to preserve register contents, since this routine is used ; just prior to termination of a program. ; Revision: Added missing RET at end. 24 Apr 88. HFB ;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; Module Entry Points PUBLIC INVERROR ; External References EXT GETCST, PUTCST, PUTER3 .Z80 CSEG ;=============================================================== ; NAME - INVERROR ; Entry: A - A=0 for internal errors, A<>0 for external errors ; B - Error code for External errors ; Undefined for Internal errors ; Exit : A = 0, Zero Flag Set (Z) if CCP is ZCPR 3.3 ; A <> 0, Zero Clear (NZ) if NOT ZCPR 3.3 ; Uses : AF,DE,HL ; Special Requirements: The SHELL bit in the command status flag ; must be preserved ;=============================================================== INVERROR: PUSH BC OR A ; Set flag LD C,0110B ; Console status flag for internal error JR Z,INVER1 SET 3,C ; Set the transient program bit INVER1: CALL GETCST OR C ; Set appropriate bits CALL PUTCST LD A,B ; Get the external error code CALL PUTER3 ; Store the error code POP BC RET END