Mail Archives: djgpp/1999/11/27/09:17:17
Message-ID: | <383F3F37.A9AA4946@interlog.com>
|
From: | Alan Illeman <illeman AT interlog DOT com>
|
X-Mailer: | Mozilla 4.04 [en] (Win95; U)
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | VBE links in djgppfaq ??
|
Lines: | 41
|
Date: | Fri, 26 Nov 1999 21:17:27 -0500
|
NNTP-Posting-Host: | 154.5.73.87
|
X-Trace: | cac1.rdr.news.psi.ca 943668632 154.5.73.87 (Fri, 26 Nov 1999 21:10:32 EST)
|
NNTP-Posting-Date: | Fri, 26 Nov 1999 21:10:32 EST
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
In section 10.2 of the djgppfaq, there are 3 links re:VBE..
ftp.neosoft.com/pub/users/s/sandmann
www.tr66.com/~brennan/djgpp/vbe.zip
breenan.home.ml.org/djgpp
..but none of them exist.
Can someone help with converting this code for djgpp ??
BOOL GetVgaInfo(VGAINFO *vgainfo)
{
union REGS ir, or;
struct SREGS sr;
ir.x.ax = GET_VESA_VGA_INFO;
ir.x.di = FP_OFF(vgainfo);
sr.es = FP_SEG(vgainfo);
int86x(0x10, &ir, &or, &sr);
if(or.h.ah == 1 || or.h.al != 0x4F)
return FALSE;
return TRUE;
}
If I understand the faq correctly, djgpp packs structures automatically
and so I should allocate a char buffer below the 1 Mb limit and use
the ansi macro "offsetof" to access the members..
#define offsetof(s_type,mbr) ((size_t) &((s_type*)0)->mbr)
Can't I just use pragmas instead ??
#pragma pack(1)
typedef struct {
...
}VGAINFO;
#pragma pack(0)
Thanks.
Alan
- Raw text -