Xref: news2.mv.net comp.os.msdos.djgpp:3629 Newsgroups: comp.os.msdos.djgpp From: mdruiter AT cs DOT vu DOT nl (Ruiter de M) Subject: Re: more sizeof questions Nntp-Posting-Host: galjoen.cs.vu.nl References: <199605090048 DOT UAA09442 AT eelab DOT newpaltz DOT edu> Sender: news AT cs DOT vu DOT nl Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Date: Thu, 9 May 1996 14:11:49 GMT Message-ID: Lines: 29 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp John Fortin (fortin44 AT eelab DOT newpaltz DOT edu) wrote: : OK, I'm a bit confused..(nothing new i'm afraid)... The structure : below was taken from the VESA 1.2 spec. sizeof(_VGAInfoBlock) should : be 256. DJGPP gives 260. What's up with this. A previous posting : mentioned 4 byte boundaries, but 256 is divisable by 4. Any Ideas?? : : typedef unsigned char BYTE; : typedef unsigned short WORD; : typedef unsigned long DWORD; : : typedef struct : { : DWORD VESASignature; 4 : WORD VESAVersion; 2 DWORDs aligned on 4 byte boundary. +2 : DWORD OEMStringPointer; 4 : DWORD Capabilities; 4 : DWORD VideoModePointer; 4 : WORD TotalMemory; 2 I guess 2 extra bytes too +2 : BYTE Info[236]; 236 : } _VGAInfoBlock; = 256 bytes +4=260 'Don't know exactly but I think I guessed right :) -- Groeten, Michel. http://www.cs.vu.nl/~mdruiter \----/====\----/ \ / \ / "You know, Beavis, you need things that suck, to have \/ \/ things that are cool.", Butthead.