Mail Archives: djgpp/2001/05/05/11:19:43
> From: "Thomas Schachtner" <thomas DOT schachtner AT gmx DOT de>
> 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.
- Raw text -