; SHOWENV.Z80 envdes: call banner ; Display column header call gxymsg defb 3,15 defb highon defb ' System Component ' defb highoff,0 call gxymsg defb 3,45 defb highon defb ' Address ' defb highoff,0 call gxymsg defb 3,62 defb highon defb ' Size ' defb highoff,0 ; Display the module names ld hl,5*100h+7 ; Row 5, column 7 ld (infoxy),hl call vprxy defb 'Multiple Command Line Buffer (MCL)',0 call vprxy defb 'Command Search Path (PATH)',0 call vprxy defb 'Shell Stack (SHL)',0 call vprxy defb 'Named Directory Register (NDR)',0 call vprxy defb 'Flow Command Package (FCP)',0 call vprxy defb 'Resident Command Package (RCP)',0 call vprxy defb 'Input/Output Package (IOP)',0 call vprxy defb 'Environment Descriptor (ENV)',0 call dispxy call vprxy defb 'Message Buffer (MSG)',0 call vprxy defb 'External File Control Block (XFCB)',0 call vprxy defb 'System Stack (STK)',0 call vprxy defb 'Wheel Security Byte (WHL)',0 call dispxy call vprxy defb 'Basic I/O System (BIOS)',0 call vprxy defb 'Disk Operating System (DOS)',0 call vprxy defb 'Console Command Processor (CCP)',0 ; Display the addresses ld hl,5*100h+48 ; Row 5, column 48 ld (infoxy),hl call dispxy ld a,18h ; Command line buffer call pradr call dispxy ld a,9 ; Search path call pradr call dispxy ld a,1eh ; Shell stack call pradr call dispxy ld a,15h ; NDR call pradr call dispxy ld a,12h ; FCP call pradr call dispxy ld a,0ch ; RCP call pradr call dispxy ld a,0fh ; IOP call pradr call dispxy ld a,1bh ; ENV call pradr call dispxy call dispxy ld a,22h ; MSG call pradr call dispxy ld a,24h ; XFCB call pradr call dispxy ld a,26h ; System stack call pradr call dispxy ld a,29h ; Wheel call pradr call dispxy call dispxy ld a,45h ; BIOS call pradr call dispxy ld a,42h ; DOS call pradr call dispxy ld a,3fh ; CCP call pradr ; Display the size data ld hl,5*100h+59 ; Row 5, column 59 ld (infoxy),hl ld a,1ah ; Command line call prbytxy defb ' characters',0 ld a,0bh ; Path call prbytxy defb ' elements',0 ld a,20h ; Shell stack elements call prbytxy defb ' ',0 ld a,21h ; Size of each element call compenv ld a,(hl) call pafdc call vprint defb '-byte entries',0 ld a,17h ; NDR call prbytxy defb ' names',0 ld a,14h ; FCP call prbytxy defb ' records',0 ld a,0eh ; RCP call prbytxy defb ' records',0 ld a,11h ; IOP call prbytxy defb ' records',0 ld a,1dh ; ENV call prbytxy defb ' records',0 ld hl,20*100h+59 ; Row 20, column 59 ld (infoxy),hl ld a,44h ; DOS call prbytxy defb ' records',0 ld a,41h ; CCP call prbytxy defb ' records',0 jp getcmd ;---------------------------------------- ; Print address pointed to by offset in register A as 4 hex characters pradr: call compenv ; Calculate the address ld e,(hl) inc hl ld d,(hl) ex de,hl ; Address value in HL ld a,h ; See if it is zero or l jp nz,phl4hc ; If not zero, display it call vprint defb '----',0 ret ;---------------------------------------- ; Print byte pointed to by offset in register A as decimal characters prbyte: call compenv ; Compute address in ENV ld a,(hl) ; Get byte jp padc ;---------------------------------------- ; Position cursor to next line, print byte in decimal, and then print ; string at return address. prbytxy: call dispxy call prbyte jp vprint ;---------------------------------------- ; Add A to base address in ENVPTR and return result in HL compenv: ld hl,(envptr) ; Get base address add a,l ; Add offset ld l,a ld a,h adc a,0 ld h,a ret ; End SHOWENV.Z80