From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: read a specific memory address Date: 2 May 2001 15:22:27 GMT Organization: Aachen University of Technology (RWTH) Lines: 31 Message-ID: <9cp8nj$ap6$1@nets3.rz.RWTH-Aachen.DE> References: <9cp464$ju8$1 AT news2 DOT dtag DOT de> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 988816947 11046 137.226.32.75 (2 May 2001 15:22:27 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 2 May 2001 15:22:27 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Thomas Schachtner wrote: > I want to read a value that is stored on (Real-Mode-)Address: F000:0000 That's simple. Use the _farpeekb() function. > And another value from e. g. 0x03847384 (a 32 bit memory address). There is no such thing as an absolute memory address, from the point of view of a DJGPP application. We use a segmented memory model similar to the 'tiny' model of 16 bit PC programing times, but with segments potentially 4 Gigabytes long. You're probably referring to a linear adress space (i.e. the actual physical address bits at the CPU's pins). You need special function of the __dpmi_*() family to map such addresses into the program's memory space, which are not available in all DPMI environments. > is the address the same as the value from a pointer? No. > Why not? Because of the Memory Management Unit (MMU) built into all x86 CPUs since the 386. It translates logical addresses into linear/physical ones, based upon settings you make in the 'descriptor tables'. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.