; SHOWSHL.Z80 shstack: call banner call gxymsg defb 3,31 defb highon,' Shell Stack Data ',highoff,0 call getsh ; Get shell data jr nz,shs1 ; If shells implemented, skip ahead call gxymsg defb 8,20 defb 'Shell Stack NOT Available on this System',0 jp getcmd ; Print Shell Stack Content Data shs1: ex de,hl ; Save pointer in DE ld hl,6*100h+4 ; Set cursur pointer to line 6, column 4 ld (infoxy),hl ex de,hl call getsh ; Get shell stack data ld e,b ; Get element size in DE ld d,0 ld b,a ; Get element count in B ld c,'1' ; Set digit in C shs2: call vprxy defb highon defb ' Element ',0 ld a,c ; Element number call cout call vprint defb ' ',highoff,' ',0 ld a,(hl) ; Check for element in stack or a ; 0 = empty jr nz,shs3 ; Branch if not empty call vprint defb 'NOT USED',0 jr shs3a shs3: call vprint defb 'Command line: ',0 push hl ; Save pointer to stack entry call pstr ; Display the command line pop hl ; Memory dump of shell stack entry SHS3A: push bc ; Save shell counters ld c,2 ; Line count (32 bytes to dump) shs4: call vprxy ; Position to next line and indent defb ' ',0 call dumpline ; Display line of memory dec c ; Any more lines? jr nz,shs4 ; Back for second line pop bc ; Get stack counters back ; Next stack element shs5: call dispxy ; Skip an extra line inc c ; Increment stack element number djnz shs2 ; Back for more elements jp getcmd ; End SHOWSHL.Z80