www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/02/05:53:35

Message-ID: <363D8E66.CD0DDE3D@gmx.de>
Date: Mon, 02 Nov 1998 11:50:14 +0100
From: Christian Hofrichter <ChristianHofrichter AT gmx DOT de>
X-Mailer: Mozilla 4.05 [de]C-QXW0310a (Win95; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Neeed some help about protected-mode-memory-management
Reply-To: djgpp AT delorie DOT com

--------------FC45C735E917CFD8ADAB54AF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

1st.
How can I get the offset of a variable or a function ?

            offset=&variable;
            offset=function  or  offset=&function

Is this right ?
2nd.
How can I get the size of a function ?
(with sizeof ????)
3rd.
Why do I have to lock the memory when I want to access a linear address
? I mean when this space is swaped to disk and I want to access it with
a selector and an offset, doesn't the dpmi-server reload it from disk
automaticly ?
4th.
When I want to copy memory-blocks in the space above 1 MB (in
assembler), is this the same procedure like in real-mode with the
difference that I have to store the selectors in the registers where I
had to store the segments in the real-mode before ?
5th.
Can I have direct access to memory in the space above1 MB  without using
the FAT DS method ?
6th.
Can I have direct access to memory in the space under 1 MB  without
using the FAT DS method ?
7th.
When I map linear memory, what does it mean ? Does it mean that I can
access this memory-space without a selector because this space is now in
the available address space of my program ? That would mean that the
offset of the varaibles and functions to the memory-space  descripted by
the discriptor is changed !!!!
Or does it mean that I only get a selector to access it ?
8th.
How can I get the physical address when I have a selector and an offset
(this memory-space is not swaped to disk) ?
9th.
Do the memory-copy-routines - for the protected-mode in Djgpp- move 4
bytes at one time ?


--------------FC45C735E917CFD8ADAB54AF
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
<B>1st.</B>
<BR>How can I get the offset of a variable or a function ?

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; offset=&amp;variable;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
offset=function&nbsp; <B>or&nbsp; </B>offset=&amp;function

<P>Is this right ?
<BR><B>2nd.</B>
<BR>How can I get the size of a function ?
<BR>(with <B>sizeof</B> ????)
<BR><B>3rd</B>.
<BR>Why do I have to lock the memory when I want to access a linear address
? I mean when this space is swaped to disk and I want to access it with
a selector and an offset, doesn't the dpmi-server reload it from disk automaticly
?
<BR><B>4th.</B>
<BR>When I want to copy memory-blocks in the space above 1 MB (in assembler),
is this the same procedure like in real-mode with the difference that I
have to store the selectors in the registers where I had to store the segments
in the real-mode before ?
<BR><B>5th.</B>
<BR>Can I have direct access to memory in the space above1 MB&nbsp; without
using the FAT DS method ?
<BR><B>6th.</B>
<BR>Can I have direct access to memory in the space under 1 MB&nbsp; without
using the FAT DS method ?
<BR><B>7th.</B>
<BR>When I map linear memory, what does it mean ? Does it mean that I can
access this memory-space without a selector because this space is now in
the available address space of my program ? That would mean that the offset
of the varaibles and functions to the memory-space&nbsp; descripted by
the discriptor is changed !!!!
<BR>Or does it mean that I only get a selector to access it ?
<BR><B>8th.</B>
<BR>How can I get the physical address when I have a selector and an offset
(this memory-space is not swaped to disk) ?
<BR><B>9th.</B>
<BR>Do the memory-copy-routines - for the <B>protected-mode</B> in Djgpp-
move 4 bytes at one time ?
<BR>&nbsp;</HTML>

--------------FC45C735E917CFD8ADAB54AF--

- Raw text -


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