; SHOWNDR.Z80 namedir: call banner call gxymsg defb 3,29 defb highon,' Named Directory Data ',highoff,0 call getndr ; Get location of NDR jr nz,ndir1 ; Branch if NDR supported call gxymsg defb 8,22 defb 'Named Directory Buffer Not Available',0 jp getcmd ; Print Names of Directory Elements ndir1: ld de,7*100h+7 ; Row 7, column 7 ld (infoxy),de ; Store cursor position call dispxy ld de,100h ; Set entry count and drive 1 ; Print Each Resident Dir Name ndir2: ld a,(hl) ; Get table entry or a ; End of table? jp z,getcmd cp d ; Same drive? jr z,ndir3 ; Branch if same drive ; Advance to Next Set of Entries for New Drive ld d,a ; Set new drive ld a,e ; Get entry count and 3 ; 4 entries per line call nz,dispxy ; Advance 1 line if current incomplete ld e,0 ; Reset counter call dispxy ; Position on screen ; Print DU: ndir3: ld a,(hl) ; Get drive add a,'@' ; Convert to letter (A to P) call cout inc hl ; Point to user ld a,(hl) call padc ; Print user number call vprint ; Print separator defb ': ',0 inc hl ; Point to name ; Print DIR ld b,8 ; Eight characters in name ndir4: ld a,(hl) call cout inc hl djnz ndir4 ; Advance to Next and Print Separator ld c,8 ; Skip over password (B already 0) add hl,bc call vprint ; Print separator defb ' ',0 ; New Line Counter inc e ; Increment entry counter ld a,e ; Check for done and 3 ; Every 4 call z,dispxy ; Go to next line if current line full jr ndir2 ; Print next entry ; End SHOWNDR.Z80