From: pybe@dutndo7.tn.tudelft.nl (Pybe Faber)
Subject: Something for the Delphi tips section? 
Date: Sun, 4 Jun 95 22:19:27 +0200

Hi,

I just discovered your Delphi page and read the tips section with
interest: a lot of usefull stuff.
Some time ago I posted a question on comp.lang.pascal (and got an
answer) that I think may fit in: how to access the memory between A000-
FFFF.
The answer below was posted by Jeremiah Gilbert, I added the B800 and
the D000 descriptors, which he forgot.

Sorry to dump more stuff on you,

Pybe Faber
pybe@cpo.tn.tudelft.nl


{ SEGS.PAS }
{ Segment support unit for Delphi or TPW
Originally from: jgilbert@nyx10.cs.du.edu (Jeremiah Gilbert)
Newsgroups:      comp.lang.pascal
Edited by:       pybe@cpo.tn.tudelft.nl (Pybe Faber)

  When addressing these functions create a pointer this way:
  ptr(ofs(SegXXXX), Offset);
  unlike DOS's:
  ptr(SegXXXX, Offset);
}

{$I-,D-,S-,R-,Q-,G-,N-,E-,X+}

unit segs;

interface

function  Seg0040: word;
function  SegA000: word;
function  SegB000: word;
function  SegB800: word;
function  SegC000: word;
function  SegD000: word;
function  SegE000: word;
function  SegF000: word;

implementation

{ Segment declarations for Delphi from Win Kernel }
function Seg0040: word; external 'KERNEL' index 193;
function SegA000: word; external 'KERNEL' index 174;
function SegB000: word; external 'KERNEL' index $B5;
function SegB800: word; external 'KERNEL' index 182;
function SegC000: word; external 'KERNEL' index 195;
function SegD000: word; external 'KERNEL' index $B3;
function SegE000: word; external 'KERNEL' index 190;
function SegF000: word; external 'KERNEL' index 194;
end.


