Program PD; { Author: Joe Wright Date: 22 Sep 89 Poorman's version of PWD.COM to demonstrate NZ-TOOL.BOX and access to the Z3NDIR structure. Updated: Lee Bradley Date: 12 May 08, 25 Sep 08 Compile with End Address of 3000 hex. } {$I nz-tool.def} {$I nz-tool.box} label 100; var ndir : ndrptr; x, y : Integer; const ver = '0.4'; Begin if not z3exist Then Begin WriteLn('Z3 not found.'); goto 100; End; ndir := Ptr(getndr); if Ord(ndir)=0 Then Begin WriteLn('Named Directory not found.');goto 100; End; if Ord(z3eadr^.extfcb)=0 Then Begin WriteLn('External FCB not found.');goto 100; End; name := namstr(z3eadr^.extfcb^.name); y := 13; x := 25; ClrScr; WriteLn; WriteLn('Print Working Directories, Version ',ver); WriteLn(' Syntax: ',name,' [P]'); WriteLn(' The P option will show Passwords if Wheel is ON'); Write(' Z3 Wheel is O'); if getwhl then WriteLn('N') else WriteLn('FF'); WriteLn; WriteLn; While Lo(ndir^.du) <> 0 do Begin if x > 20 then x := 1 else x := 35; y := y+1; GoToXY(x,y div 2); if getduok then pdu(swap(ndir^.du)); name := namstr(ndir^.name); pass := namstr(ndir^.pass); x := x+5; GoToXY(x,y div 2); Write(name); if (fcb1.name[1]='P') and getwhl then Begin x := x+9; GoToXY(x,y div 2); Write(' Pass: ',pass); End; WriteLn; ndir := Ptr(Ord(ndir)+SizeOf(ndrrec)); End; 100: End.