| delorie.com/archives/browse.cgi | search |
| Message-Id: | <199605090728.DAA00334@delorie.com> |
| Date: | Thu, 09 May 96 10:17:49 LIT |
| From: | Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT> |
| Subject: | Re: more sizeof questions |
| To: | John Fortin <fortin44 AT eelab DOT newpaltz DOT edu>, |
| DJGPP mailing list <djgpp AT delorie DOT com> | |
| In-Reply-To: | Your message of Wed, 8 May 1996 19:45:41 +0000 |
On Wed, 8 May 1996 19:45:41 +0000 you said:
>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??
>
>TIA
>John
>
>typedef unsigned char BYTE;
>typedef unsigned short WORD;
>typedef unsigned long DWORD;
>
>typedef struct
>{
> DWORD VESASignature; 4
> WORD VESAVersion; 2
+ 2 byte filler
> DWORD OEMStringPointer; 4
> DWORD Capabilities; 4
> DWORD VideoModePointer; 4
> WORD TotalMemory; 2
+ 2 byte filler
> BYTE Info[236]; 236
>} _VGAInfoBlock; = 256 bytes
>
>
>John E. Fortin
>fortin44 AT eelab DOT newpaltz DOT edu
EVERY field must be 4-byte aligned. See my previous posting for a workaround.
Martynas
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |