home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / lan / spoolit / lstcap.pas < prev    next >
Pascal/Delphi Source File  |  1987-02-15  |  1KB  |  51 lines

  1. program test_Spool;
  2.  
  3. { Written by Scott A. Lewis 08/26/86 }
  4. { CIS ID 76515,135 }
  5.  
  6. { This is an example of using the Novell List capture feature to
  7.  spool print data and then release the spool when done }
  8.  
  9. type
  10.   IntResult       = record                                 { For MSDOS Calls }
  11.                       case integer of
  12.                           0 : (AX,BX,CX,DX,BP,SI,DI,DS,ES,Flags : integer);
  13.                           1 : (AL,AH,BL,BH,CL,CH,DL,DH : byte)
  14.                     end;
  15.  
  16. procedure lstcaptureon;    { Start spooling }
  17.  
  18.   var
  19.     reg : intresult;
  20.  
  21.   begin
  22.     reg.ah:=$DF;
  23.     reg.dl:=0;
  24.     intr ($21,reg)
  25.   end;
  26.  
  27. procedure lstcaptureoff;  { Stop Spooling }
  28.  
  29.   var
  30.     reg : intresult;
  31.  
  32.   begin
  33.     reg.ah:=$DF;
  34.     reg.dl:=1;
  35.     intr ($21,reg)
  36.   end;
  37.  
  38. procedure topofform;        { Send top of form character    }
  39. begin                       { Replace with something else   }
  40.   write(lst,#12);           { if your printer is different. }
  41. end;
  42.  
  43. begin
  44.   lstcaptureon;                 { spool }
  45.   topofform;                    { form feed }
  46.   writeln (lst);                { blank lines }
  47.   writeln (lst);
  48.   writeln (lst,'Sample text');  { text }
  49.   topofform;                    { eject sheet }
  50.   lstcaptureoff;                { end spool }
  51. end.