Date: Sat, 05 May 2001 17:58:38 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Thomas Schachtner" Message-Id: <9003-Sat05May2001175837+0300-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: <000c01c0d56e$77a9a7e0$cb099d3e@iron> (thomas.schachtner@gmx.de) Subject: Re: read a specific memory address References: <9cp464$ju8$1 AT news2 DOT dtag DOT de> <9cp8nj$ap6$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <9cu780$5rr$1 AT news2 DOT dtag DOT de> <3028-Fri04May2001183719+0300-eliz AT is DOT elta DOT co DOT il> <000c01c0d56e$77a9a7e0$cb099d3e AT iron> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: "Thomas Schachtner" > Date: Sat, 5 May 2001 16:19:57 +0200 > > sorry to write via mail, but at the moment I don't have a News server > connection. The mailing list djgpp AT delorie DOT com is 2-way gated into the news group (the mail reflector runs on DJ Delorie's server). So you may use djgpp AT delorie DOT com whenever you cannot access the news, and don't need to apologize for that. > I tried the _farpeekb() function and it worked fine for memory in the "DOS > memory space". But outside this area it didn't work. What do you mean by ``outside this area''? Please tell what address did you try to access, and how did you get that address. > So I wanted to use dpmi... funtions. But I don't know the selector.... If you have a selector, you can use _farpeekb, you don't need anything more fancy (and the fancier functions won't help you anyway, if I understand correctly what do you want to accomplish). > How can I get the selector I need? Do I have to create one? > How can I create a selector? How can I tell the function the memory area I > want to read if there are only relative or segmented addresses? Please read sections 18.4 and 18.7 of the DJGPP FAQ list (v2/faq230b.zip from the same place you downloaded DJGPP). They describe several techniques for moving data between DJGPP programs and memory outside your normal address space, including how to create selectors for them. > Sorry for my stupid questions! > In real mode programming I did something, but protected mode is something I > never learned (and propably never will learn)... > I think it is quite complicated... > With all this GDT, LDT, Descriptors, selectors and so on... I think you already got the essence of it correctly: you need a valid selector to access any memory outside your program's data segment.