Mail Archives: djgpp/2001/06/14/19:46:03
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
- Raw text -