; SHOWERR.Z80 errorh: call banner call gxymsg defb 3,27 defb highon,' Error Processing Data ',highoff,0 ld hl,6*100h+45 ld (infoxy),hl call pecdisp ; Show program error code value ld hl,6*100h+5 ld (infoxy),hl call ehddisp ; Display error handler information call dispxy call vprxy defb highon,' Command Error Status: ',highoff,0 ld e,3 ; Check command status flag for error call msgbyte bit 1,a jr nz,errorh1 ; Branch if error condition call vprint defb ' NO ERROR',0 jp getcmd errorh1: call z33chk ; See if ZCPR33 is running jr z,errorh1a ; If so, skip call vprint defb ' ERROR',0 jp errorh4 errorh1a: ld hl,10*100h+9 ld (infoxy),hl call vprxy defb 'Error Source: ',0 ld e,3 ; Check internal/external bit in status flag call msgbyte bit 3,a jr z,errorh2 ; Branch if internal error call vprint defb 'EXTERNAL',0 jr errorh3 errorh2: call vprint defb 'CPR/ECP',0 errorh3: call vprxy defb 'Command Error Code: ',0 ld e,0 call msgbyte push af ; Save code call pafdc call vprxy defb 'Description: ',0 pop af ; Get error code back ld hl,errorh4 ; Set up return address push hl call acase1 ; CASE function defb 11 ; Eleven cases defw unknown ; Default case defb 1 defw duchange ; Illegal attempt to change directory defb 2 defw baddu ; Invalid directory defb 3 defw badpw ; Incorrect password defb 5 defw badform ; Bad command form (wild or type given) defb 6 defw badecp ; Command not found by CPR or ECP defb 7 defw badcmd ; Command file not found by CPR defb 8 defw ambig ; Ambiguous file spec defb 9 defw badnum ; Bad numerical value defb 10 defw nofile ; Object file not found defb 11 defw diskfull ; Disk is full defb 12 defw tpafull ; TPA overflow duchange: call vprint defb 'Illegal attempt to change directory',0 ret baddu: call vprint defb 'Invalid directory specification',0 ret badpw: call vprint defb 'Incorrect password',0 ret badform: call vprint defb 'Bad command form (file type / wild card)',0 ret badecp: call vprint defb 'Command not found by CCP or ECP',0 ret badcmd: call vprint defb 'Requested load file not found',0 ret ambig: call vprint defb 'Ambiguous or missing file name',0 ret badnum: call vprint defb 'Bad numerical expression',0 ret nofile: call vprint defb 'Requested operand file not found',0 ret diskfull: call vprint defb 'Disk full',0 ret tpafull: call vprint defb 'TPA full (program too big)',0 ret unknown: call vprint defb 'Unknown error type',0 ret errorh4: call gxymsg defb 14,5 defb highon,' Defective Command: ',highoff,' ',0 call erradr ; Get address of bad command errorh5: ld a,(hl) ; Get next character or a ; If end of command line jr z,errorh6 ; ..get next SHOW command cp ';' ; If end of current command errorh6: jp z,getcmd ; ..get next SHOW command call cout ; Otherwise display it inc hl ; Point to next jr errorh5 ; End SHOWERR.Z80