Mail Archives: djgpp/1995/09/11/04:03:33
Lars Damerow (lars3 AT ix DOT netcom DOT com) wrote:
: That's right, it's another stupid question from Lars Damerow!! :)
: I'm trying to move information from the transfer buffer to a struct
: variable using dosmemget. The struct is set up to match the data that a
: VESA interrupt is putting in the buffer. So, this is what I'm trying:
: __dpmi_regs r;
: r.x.ax=0x4f00;
: r.x.ss=r.x.sp=0;
: r.x.di=__tb & 0x0f;
: r.x.es=(__tb>>4) & 0xffff;
: __dpmi_int (0x10,&r);
: dosmemget(__tb, 256, &vesainfo);
: vesainfo is the struct that I defined. I'm hoping that dosmemget will
: just dump the data to the address of vesainfo and fill in the struct.
: When this code is executed, however, vesainfo is filled with garbage.
: What am I doing incorrectly? Is this even possible? I'm using version 2,
: beta 2.. thanks!
Well.. is your struct really defined correctly? Sometimes C compilers
will align your data in your struct on even memory addresses.. or even
paragraph addresses.. you need to tell it to PACK your struct data...
(Ask someone else how to do this.. as I've never bothered to check
for DJGPP)...
-Sam
- Raw text -