Message-Id: <5.0.2.1.1.20010615092912.00a8ca10@rsbsgpo.anu.edu.au> X-Sender: siebke AT rsbsgpo DOT anu DOT edu DOT au X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Date: Fri, 15 Jun 2001 09:44:47 +1000 To: djgpp AT delorie DOT com From: Katharina Siebke Subject: still fighting with DOS, here memory allocation In-Reply-To: References: <20010614133028 DOT EFDE DOT H DOT M DOT BRAND AT hccnet DOT nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 Hi group, this is my first question to you. I hope I am in the right place to ask this question: who still knows DOS? I have got a program wich contains this code: ----------------------------------------------------------------------------------------------------------- /* this is just to recall the definition */ typedef struct { unsigned short offset16; unsigned short segment; } __dpmi_raddr; This structure is used to hold a real-mode address, which consists of a segment:offset pair. typedef struct { unsigned long offset32; unsigned short selector; } __dpmi_paddr; ------------------------------------------------------------------------------------------------------------- static __dpmi_raddr dosside; /*dos address of buffer*/ static __dpmi_paddr protectside; /*protect side of buffer*/ int sel, dosside.offset16=0; dosside.segment = __dpmi_allocate_dos_memory((MEM_BLOCK+15)>>4, &sel); protectside.selector= (unsigned short) sel; My question is, are these both pointers: dosside.segment and protectside.segment really show to the same piece of memory. Or in other words how does an integer pointing to a piece of memory translated into the given structure. Who can help me with that? Thank you Katharina