; SHOWCMDS.Z80 ; Entry point for display of FCP information left equ 10 sep equ 12 fcp: call banner call gxymsg defb 3,29 defb highon,' Flow Command Package ',highoff,0 call getfcp ; See if FCP implemented jr nz,fcp1 ; Branch if it is there call gxymsg defb 8,22 defb 'Flow Command Package not implemented',0 jp getcmd ; Display the command names fcp1: call gxymsg defb 8,5 defb highon,' Flow (FCP) Commands: ',highoff,0 call whlmsg ; Message about wheel-restricted commands ld hl,10*100h+left ; Display starts in row 10 ld (infoxy),hl call getfcp ; Get FCP address into HL ld de,5 ; Offset to command table add hl,de call listcmds ; Display the list of commands ; Display the resident IF options inc hl ; Point to beginning of option table push hl ; Save the pointer while we set the cursor call gxymsg defb 14,5 defb highon,' Resident IF Options: ',highoff,0 ld hl,16*100h+left ; Start in row 14 ld (infoxy),hl pop hl ; Get pointer to option table back ld de,2 ; Set length of each command call listcmds1 inc hl ; Point to FCP option bytes ld a,(hl) ; Make sure first byte is 33h ID byte cp 33h jp nz,getcmd ; If not, quit now inc hl ; Otherwise advance to first real option push hl call gxymsg defb 19,5 defb highon,' FCP Configuration Options ',highoff,0 ld hl,19*100h+left+25 ld (infoxy),hl pop hl call vprxy defb 'COMIF processing: ',0 bit 0,(hl) call pryn bit 0,(hl) jr z,fcp2 ; If no COMIF, we are done call vprxy defb 'Use root of path: ',0 bit 1,(hl) call pryn call vprxy defb 'Specific DU: ',0 inc hl ld a,(hl) and 0fh ; Isolate drive add a,'A' call cout ld a,(hl) rrca rrca rrca rrca and 0fh ; Get user number dec hl ; Point to option byte again bit 2,(hl) ; Check for high user jr z,lowuser add a,16 lowuser: call pafdc ; Print user number fcp2: jp getcmd ;----------------------------------------------------------------------------- rcp: call banner call gxymsg defb 3,27 defb highon,' Resident Command Package ',highoff,0 call getrcp ; See if RCP implemented jr nz,rcp1 ; Branch if it is there call gxymsg defb 8,20 defb 'Resident Command Package not implemented',0 jr rcp2 ; Display the command names rcp1: call gxymsg defb 8,5 defb highon,' Resident (RCP) Commands: ',highoff,0 call whlmsg ; Message about wheel-restricted commands ld hl,10*100h+left ; Display starts in row 10 ld (infoxy),hl call getrcp ; Get FCP address into HL ld de,5 ; Offset to command table add hl,de call listcmds ; Display the list of commands rcp2: jp getcmd ;----------------------------------------------------------------------------- ; Display the CPR resident commands cpr: call banner call gxymsg defb 3,29 defb highon,' CPR Resident Commands ',highoff,0 call z33chk ; See if ZCPR33 is running jr z,cpr1 ; Branch if it is there call gxymsg defb 8,14 defb 'Command Processor is not ZCPR33 or is not in memory',0 jr cpr2 ; Display the command names cpr1: call gxymsg defb 8,5 defb highon,' Command Processor Commands ',highoff,0 call whlmsg ; Message about wheel-restricted commands ld hl,10*100h+left ; Display starts in row 10 ld (infoxy),hl call getccp ; Get FCP address into HL ld e,offcmd ; Offset to beginning of command table ld d,0 add hl,de call listcmds ; Display the list of commands cpr2: jp getcmd ;----------------------------------------------------------------------------- ; This routine adds a message stating that wheel-restricted commands are ; listed in lower case. whlmsg: call gxymsg defb 8,38 defb '(wheel-restricted cmds in lowercase)',0 ret ;----------------------------------------------------------------------------- ; This routine displays a list of commands in a dispatch table. On entry at ; LISTCMDS, HL points to the beginning of the table to the byte with the size ; of each entry. At entry point LISTCMDS1, E must have the size of each ; command name, and HL must point to the first command. On exit, HL points to ; the terminating null at the end of the table. The variable INFOXY must have ; been previously set to point to the starting place for the display. listcmds: ld e,(hl) ; Get size of each command into E inc hl ; HL points to first command listcmds1: ld a,(hl) ; See if end of table or a ret z call setxy ; Position cursor and increment bit 7,(hl) ; See if command is wheel protected jr nz,listcmds2 ; If so, skip call prtcmduc ; Print the command uppercase jr listcmds3 listcmds2: call prtcmdlc ; Print the command lowercase listcmds3: inc hl ; Advance two extra bytes for address inc hl jr listcmds1 ;---------------------------------------- setxy: push hl ld hl,(infoxy) call gotoxy ld a,sep ; Distance between command names add a,l ; Add to column ld l,a cp 80-sep ; See if past end of line jr c,setxy1 ; If carry is set, we are done inc h ; Otherwise, increment line ld l,left setxy1: ld (infoxy),hl pop hl ret ;---------------------------------------- ; Entry points for printing command name in either upper or lower case ; characters. prtcmduc: ld a,0ffh jr prtcmdlc1 prtcmdlc: xor a prtcmdlc1: ld (casefl),a ;---------------------------------------- ; Subroutine to display the command name pointed to by HL and whose length is ; in the E register. prtcmd: ld b,e ; Set up counter prtcmd1: ld a,(casefl) ; Test for upper/lower case output or a ld a,(hl) ; Get next character jr nz,prtcmd2 ; If uppercase output, go on ahead and 7fh ; Strip high bit cp 'A' ; If less than 'A' jr c,prtcmd2 ; ..print as is cp 'Z'+1 ; If greater than 'Z' jr nc,prtcmd2 ; ..print as is add a,20h ; Convert to lowercase prtcmd2: and 7fh ; Again make sure high bit is reset call cout ; Display it inc hl ; Point to next djnz prtcmd1 ; Loop through all of them ret if usedseg dseg endif ;usedseg casefl defs 1 if usedseg cseg endif ;usedseg ; End SHOWCMDS.Z80