home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / PROGPACK / NZ-TOOL4.LBR / PD.PZS / PD.PAS
Pascal/Delphi Source File  |  2000-06-30  |  1KB  |  61 lines

  1.  
  2. Program PD;
  3.  
  4. {
  5.   Author:  Joe Wright
  6.   Date:    22 Sep 89
  7.   Version: 0.1
  8.  
  9.   Poorman's version of PWD.COM to demonstrate NZ-TOOL.BOX and
  10.   access to the Z3NDIR structure.
  11. }
  12.  
  13. { Compiled with End Address of 3000 hex. }
  14.  
  15. {$I nz-tool.box}
  16.  
  17. Var NDIR : ndrptr;
  18.     X, Y : Integer;
  19.  
  20. Begin
  21. ndir := Ptr(getndr);
  22. name := namstr(z3eadr^.extfcb^.name);
  23. y := 7;
  24. x := 25;
  25.  
  26. ClrScr;
  27. WriteLn('Print Working Directories');
  28. if fcb1.name[1] = '/' then
  29.   Begin
  30.     WriteLn('    Syntax:  ',name,' [P]');
  31.     WriteLn('  The P option will show Passwords if Wheel is ON');
  32.   End
  33. else
  34.   Begin
  35.     Write(' Z3 Wheel is O');
  36.     if getwhl then WriteLn('N') else WriteLn('FF');
  37.     if ndir^.du <> 0 then
  38.       Repeat
  39.         if x > 20 then x := 1 else x := 35;
  40.         y := y+1;
  41.         GoToXY(x,y div 2);
  42.         if getduok then pdu(Swap(ndir^.du));
  43.         name := namstr(ndir^.name);
  44.         pass := namstr(ndir^.pass);
  45.         x := x+5;
  46.         GoToXY(x,y div 2);
  47.         Write(name);
  48.         if (fcb1.name[1]='P') and getwhl then
  49.           Begin
  50.             x := x+9;
  51.             GoToXY(x,y div 2);
  52.             LowVideo;
  53.             Write(' Pass: ',pass);
  54.             NormVideo;
  55.           End;
  56.         WriteLn;
  57.         ndir := Ptr(Ord(ndir)+SizeOf(ndrrec));
  58.       Until Lo(ndir^.du) = 0
  59.   End;
  60. End.
  61.