home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / turbopas / procparm.zip / PROCPARM.P < prev    next >
Text File  |  1986-05-09  |  694b  |  25 lines

  1. {                        Version 1.0                   86/05/09
  2.  This is the "glue" that is $Included in your program to allow you to
  3.  use the PARM.BIN routines in your program }
  4.  
  5. CONST   NEAR    =  0;
  6.         FAR     =  5;
  7.         FAROfs  = $D;
  8.  
  9. TYPE ProcPtr = integer;
  10.      FarProcPtr = ^integer;
  11.  
  12. PROCEDURE  ProcParm; EXTERNAL 'PROCPARM.BIN';
  13.  
  14. PROCEDURE OffsetProc(p:FarProcPtr; Offset:integer); EXTERNAL ProcParm [FAROfs];
  15.  
  16.  
  17. FUNCTION AddrOffset(p:FarProcPtr; Offset:integer):FarProcPtr;
  18.   { calculate  p + Offset }
  19.   var proc : record ofs, seg : integer; end absolute p;
  20.   begin
  21.     with proc do begin
  22.       ofs := ofs + Offset;
  23.     end;
  24.     AddrOffset := p;
  25.   end;