www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/26/02:33:15

From: "Elias Pschernig" <f DOT x DOT gruber-museum-arnsdorf AT magnet DOT at>
Newsgroups: comp.os.msdos.djgpp
Subject: pointers under DJGPP
Date: Sat, 25 Apr 1998 08:10:04 +0200
Organization: magnet Internet Services
Lines: 31
Message-ID: <6ht8va$pau$1@orudios.magnet.at>
NNTP-Posting-Host: 195.3.67.62
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi, i have a question !

Using my old (real mode) C-compiler, i could
convert a pointer to a long-integer and then
converting it to a seg:off address.

Now i wanted to know, what exactly do
i get, when i print out a pointer under
DJGPP-C, like in the following example ?

void printpointer(void *ptr)
{
 int n=ptr; // convert 32bit ptr to 32bit int
                 // (=convert nothing at all ?)
 printf("%d",n);
}

What does the number printed out mean ?
Is it a far (selector included) or a
near pointer ?
What exactly is stored in the 32 bits of ptr ?
How can i get the absolute address (from
absolute zero) of it - using this value ?


Ok, i think you can understand what i want to know...

thanks for information,
Elias Pschernig


- Raw text -


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