From: "Elias Pschernig" Newsgroups: comp.os.msdos.djgpp Subject: Re: pointers under DJGPP Date: Mon, 27 Apr 1998 09:09:06 +0200 Organization: magnet Internet Services Lines: 40 Message-ID: <6i2l58$mft$1@orudios.magnet.at> References: <19980427032245 DOT AAG5484 AT ppp100 DOT cartsys DOT com> NNTP-Posting-Host: 195.3.67.115 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk <19980427032245 DOT AAG5484 AT ppp100 DOT cartsys DOT com>... >At 08:10 4/25/1998 +0200, Elias Pschernig wrote: >>Hi, i have a question ! >> ... >> >>What does the number printed out mean ? >>Is it a far (selector included) or a >>near pointer ? > >It is a 32-bit near pointer, relative to the program's DS segment. > >>What exactly is stored in the 32 bits of ptr ? > >An offset. > >>How can i get the absolute address (from >>absolute zero) of it - using this value ? > >Weeeel... You can get the base address of the DS segment with DPMI >functions, and add that to the offset. But that will just give you the >linear address, and the paging mechanisms make that a totally different >thing from the physical address, which there's no good way to find. Why do >you need it? > thanks for your info i think -because of dpmi- i'll not try to use absolute addresses any longer, this seems to be no good idea... but whats with "djgpp_nearptr_enable" ? the .inf-files dont say very much about it, and my experience was that paging and virtual mem and all this is very slow, too slow for my sort of programs at least, so i use the near pointers, for things like copying memory to videoram... Elias Pschernig