; SHOWMSG.Z80 msg: call banner call gxymsg defb 3,26 defb highon defb ' ZCPR3 Message Buffer Data ' defb highoff defb 0 ;---------------------------------------- ; Set up pointer for upper-left data ld hl,5*100h+2 ; Row 5, column 2 ld (infoxy),hl ; (Upper-Left 1) Display shell data call vprxy defb ' Shell Control Data',0 call vprxy defb highon defb ' Enable Shell Comment: ' defb highoff,' ',0 ld e,13 ; Offset to shell control byte call msgbyte bit 0,a ; Test bit 0 (comment bit) call pryn call vprxy defb highon defb ' Enable Shell Echo: ' defb highoff,' ',0 bit 1,(hl) ; Test bit 1 (shell echo bit) call pryn call vprxy defb highon defb ' Enable Shell Wait: ' defb highoff,' ',0 bit 7,(hl) ; Test bit 7 (shell wait bit) call pryn ; (Upper-Left 2) Show information about command and program error flags call dispxy call vprxy defb highon defb ' Command Error Code: ' defb highoff,' ',0 ld e,0 ; Offset to command error flag call msgbyte call pa2hc call pecdisp ; Display program error code ; (Upper-Left 3) Show information about error handling command line call ehddisp ; Call routine below ;---------------------------------------- ; Set up pointer for upper-right data ld hl,5*100h+45 ; Set up for row 5, column 45 ld (infoxy),hl ; (Upper-Right 1) Display command status flag information call vprxy defb ' Command Status Flag',0 call vprxy defb highon defb ' Shell Status: ' defb highoff,' ',0 ld e,3 ; Offset to command status flag call msgbyte bit 0,a ; Test bit 0 (shell status) call pryn call vprxy defb highon defb ' Error Status: ' defb highoff,' ',0 bit 1,(hl) ; Test bit 1 (error status) call pryn call vprxy defb highon defb ' Extended Cmd Status: ' defb highoff,' ',0 bit 2,(hl) ; Test bit 2 (extended command processor) call pryn call vprxy defb highon defb ' External Cmd Status: ' defb highoff,' ',0 bit 3,(hl) ; Test bit 3 (external command bit) call pryn ; (Upper-Right 2) Display ZEX and SUBMIT status call dispxy call vprxy defb highon defb ' ZEX Running: ' defb highoff,' ',0 ld e,8 ; Offset to ZEX running flag call msgbyte call pryn call z33chk ; Make sure ZCPR33 is running jr nz,skipsub ; Skip SUBMIT display if not call vprxy defb highon defb ' SUBMIT Running: ' defb highoff,' ',0 ld e,2dh ; Offset to SUBMIT running flag call msgbyte call pryn skipsub: ; (Upper-Right 3) Display current IF level call dispxy call vprxy defb highon defb ' Current IF Level: ' defb highoff,' ',0 ld e,1 ; Offset to IF level pointer call msgbyte ld c,(hl) ; Get IF flag into C ld b,8 ; Set IF level count iftst: rlc c ; Move high bit into carry jr c,iftst1 ; Branch if we found IF level djnz iftst ; Count down through bits iftst1: ld a,b ; Get IF level number call pafdc ; ..and display it ;---------------------------------------- ; Display lower register data ld hl,16*100h+2 ; Row 16, column 2 ld (infoxy),hl ; Display data in ten user registers call vprxy defb highon,' User Registers (decimal) ',highoff,0 call dispxy ld e,30h ; Offset to user registers call msgbyte ld b,10 ; Ten values to display reg1: call vprint ; Spacing between values defb ' ',0 ld a,10+'0' ; Compute register number character sub b call cout ; Display it call vprint defb '=',0 ld a,(hl) ; Get register value inc hl ; Point to next register call pa3dc ; Display value in decimal djnz reg1 ; Display system reserved values call vprxy defb highon,' System Reserved Bytes (hex) ',highoff,0 call dispxy ld b,6 ; Six values to display reg2: call vprint ; Spacing between values defb ' ',0 ld a,(hl) ; Get register value inc hl ; Point to next register call pa2hc ; Display value in hexadecimal djnz reg2 ; Display application-defined bytes call vprxy defb highon,' User-Defined Bytes (hex) ',highoff,0 call dispxy ld b,16 ; Sixteen values to display reg3: call vprint ; Spacing between values defb ' ',0 ld a,(hl) ; Get register value inc hl ; Point to next register call pa2hc ; Display value in hexadecimal djnz reg3 jp getcmd ;---------------------------------------- ; Subroutine (also used by 'E' menu selection code) to display the program ; error code value. pecdisp: call vprxy defb highon defb ' Program Error Code: ' defb highoff,' ',0 ld e,6 ; Offset to program error flag call msgbyte jp pa2hc ;---------------------------------------- ; Subroutine (used by 'E' menu selection also) to display error handling ; command information ehddisp: call vprxy defb highon defb ' Error Handler Defined: ' defb highoff,' ',0 ld e,10h ; Offset to error command line call msgbyte push hl ; Save pointer for below call pryn ; Print 'NO' if zero, 'YES' if nonzero call vprxy defb highon defb ' Error Command Line: ' defb highoff,' ',0 pop hl ; Restore pointer to error command line jp pstr ; Display what's there, if anything ;---------------------------------------- ; Subroutine to fetch a byte from the message buffer. On entry, register E ; contains the offset. On exit, HL points to the requested byte, and A ; has the byte, and the flags are set. msgbyte: call getmsg ; Get address of message buffer ld d,0 add hl,de ld a,(hl) or a ret ; End SHOWMSG.Z80