{***********************************************************************}
{									}
{ __Ptr2LSup  Convert a pointer to a long integer.			}
{									}
{ function  __Ptr2LSup(ThisPtr : pointer) : longint;			}
{									}
{	      ThisPtr	The pointer to be converted to a long integer,	}
{			the value of which represents the absolute	}
{			address in the 8086 address space.		}
{									}
{ Description This function converts a pointer to a long integer.	}
{	      This is not the same as type casting which merely views	}
{	      the 32 bit pointer quantity as a long integer.  Rather	}
{	      __Ptr2LSup converts the pointer to a long integer value	}
{	      that represents the address that the original pointer	}
{	      referenced.  First the pointer is normalized (__NPtrSup)	}
{	      and then the segment is multiplied by 16 (because the	}
{	      segment portion represents the number of paragraphs), and }
{	      finally the offset is added.  Using __Ptr2LSup, you can	}
{	      safely compare two pointers.				}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc.  1987		}
{_______________________________________________________________________}

function __Ptr2LSup(ThisPtr : pointer) : longint;

  var
    NormPtr : pointer;

  begin {__Ptr2LSup}

    NormPtr    := __NPtrSup(ThisPtr);
    __Ptr2LSup := (longint(_VectorAddr(NormPtr)._Seg) shl 4) +
				    longint(_VectorAddr(NormPtr)._Ofs)

  end;	{__Ptr2LSup}
