home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / NOVELL1.ZIP / NOVELL1.PAS
Encoding:
Pascal/Delphi Source File  |  1986-11-18  |  1.8 KB  |  57 lines

  1. program logged;
  2. (*
  3.        This program works with most current versions of novell netware
  4.        software.  It is designed to determine your station information using
  5.        msdos interrupts.
  6.        Written by:  Kip McClanahan
  7.                    9501 Bart Hollow Dr.
  8.                    Austin Tx, 78750
  9.        Feel free to ask any questions about the program.
  10.  
  11. *)
  12.  
  13. type result = record case integer of
  14.                 1:(ax,bx,cx,dx,bp,si,di,ds,es,flags:integer);
  15.                 2:(al,ah,bl,bh,cl,ch,dl,dh:byte);
  16.               end;
  17.  
  18. var regs:result;
  19.     req:array [0..3] of byte;      {request packet}
  20.     rep:array [0..255] of byte;    {reply packet}
  21.     x,r,y:integer;
  22.  
  23. begin
  24.   clrscr;
  25.  repeat begin
  26.   for x:=0 to 255 do rep[x]:=$00;  {clear it out}
  27.   regs.ds:=seg(req);               {segment address of the req. buffer}
  28.   regs.si:=ofs(req);               {offset for buffer address}
  29.  
  30.   regs.es:=seg(rep);               {segment for reply buffer}
  31.   regs.di:=ofs(rep);               {offset for reply buffer}
  32.  
  33.   req[0]:=$03;                     {Length of req. buffer: LOW}
  34.   req[1]:=$00;                                     {high byte}
  35.   req[2]:=22;                      {command number}
  36.   write ('enter station #:');
  37.   readln (req[3]);
  38.  
  39.   rep[0]:=$ff;                     {low byte}
  40.   rep[1]:=$00;                     {high byte}
  41.  
  42.  
  43.   regs.ah:=$e3;                     {function  number}
  44.   intr($21,regs);                   {call the interrupt}
  45.   writeln ('unique ID:',rep[2],rep[3],rep[4],rep[5]);
  46.   writeln ('Type:',rep[6],rep[7]);
  47.   write ('Object name:');
  48.   for r:=8 to 56 do write (chr(rep[r]));
  49. (*  writeln;
  50.   writeln ('log time:',rep[57]);  *)
  51.   writeln;
  52.   writeln;
  53.  end;
  54.  until req[3]=0;
  55.  
  56. end.
  57.