;
; Program: ERRORX
; Author:  Richard Conn
; Version: 1.0
; Date:  29 Mar 84
;
version equ     10
z3env   SET     0f400H

;
;       ERRORX disengages the current error handler.  No error handler
; is available after ERRORX executes.
;

;
;  SYSLIB and Z3LIB References
;
       ext     z3init,puter1,print

;
; Environment Definition
;
       if      z3env ne 0
;
; External ZCPR3 Environment Descriptor
;
       jmp     start
       db      'Z3ENV' ;This is a ZCPR3 Utility
       db      1       ;External Environment Descriptor
z3eadr:
       dw      z3env
start:
       lhld    z3eadr  ;pt to ZCPR3 environment
;
       else
;
; Internal ZCPR3 Environment Descriptor
;
       MACLIB  Z3BASE.LIB
       MACLIB  SYSENV.LIB
z3eadr:
       jmp     start
       SYSENV
start:
       lxi     h,z3eadr        ;pt to ZCPR3 environment
       endif

;
; Start of Program -- Initialize ZCPR3 Environment
;
       call    z3init  ;initialize the ZCPR3 Env and the VLIB Env

;
; Turn Off Message
;
       mvi     a,0     ;turn off error handler
       call    puter1  ;use SYSLIB routine

;
; Print Message
;
       call    print
       db      'ERRORX Version '
       db      (version/10)+'0','.',(version mod 10)+'0'
       db      ' -- Error Handler Disengaged',0
       ret

       end