From: "Joel_S" Newsgroups: comp.os.msdos.djgpp Subject: Re: Vesa 2.0 Date: Tue, 04 Mar 2003 05:33:24 +0100 Organization: Web2news.com Message-ID: <17488N404@web2news.com> References: <17326N022 AT web2news DOT com> <17482N497 AT web2news DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 198.81.26.238 X-Complaints-To: abuse AT web2news DOT net Lines: 50 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Huh? Here's all of the code, exactly what's in the link I gave: #include #include #include typedef struct VESA_PM_INFO { unsigned short setWindow __attribute__ ((packed)); unsigned short setDisplayStart __attribute__ ((packed)); unsigned short setPalette __attribute__ ((packed)); unsigned short IOPrivInfo __attribute__ ((packed)); } VESA_PM_INFO; VESA_PM_INFO *vesa_pm_info; void *pm_bank_switcher; int get_vesa_pm_functions() { __dpmi_regs r; /* check that the driver is at least VBE version 2.0 */ /* call the VESA function */ r.x.ax = 0x4F0A; r.x.bx = 0; __dpmi_int(0x10, &r); if (r.h.ah) return -1; /* allocate space for the code stubs */ vesa_pm_info = malloc(r.x.cx); /* copy the code into our address space */ dosmemget(r.x.es*16+r.x.di, r.x.cx, vesa_pm_info); /* store a pointer to the bank switch routine */ pm_bank_switcher = (void *)((char *)vesa_pm_info + vesa_pm_info->setWindow); return 0; } > "Joel_S" wrote in > news:17482N497 > @web2news.com: > >>> Hint: The code on that page is C, not C++. > >> Yes, and I'm compiling it as a C file, and not a CPP file, so do you >> have any other advice? > > yes, post a minimal, compilable code sample so we can > diagnose the problem. -- Direct access to this group with http://web2news.com http://web2news.com/?comp.os.msdos.djgpp