www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/04/27/11:16:04

Date: Thu, 27 Apr 1995 16:17:40 +0300
From: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
To: s709 AT icslab DOT agh DOT edu DOT pl
Subject: Re: more on extended memory
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

> and I got:  i = 0x38
>
> I think this is an index in the descriptor table which includes
> among other things base addresses of the segments and their length.

Yes.

> u_short i = _go32_conventional_mem_selector();
> printf("value = %x\n", *((int *)(int)i ));
> }
> 
> and I got:
> Segmentation violation in pointer 0x00000038 at d8:11ca ...
>
> I think this area of memory is protected but is there any
> way to access the descriptor table to see what is real segment's
> base address and its length ?

Use functions from <sys/farptr.h>.  You might find it useful to read
Chapter 18 of the DJGPP FAQ list (available as faq100.zip from the
same place you get DJGPP).  It discusses these issues at length.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019