delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/03/03/23:45:08

From: "Joel_S" <jbs30000 DOT news DOT invalid AT web2news DOT net>
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> <Xns9333C01A96E16asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8> <17482N497 AT web2news DOT com> <Xns9333E7234487Dasu1cornelledu AT 132 DOT 236 DOT 56 DOT 8>
MIME-Version: 1.0
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 <dpmi.h>
#include <stdlib.h>
#include <sys/movedata.h>
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" <jbs30000 DOT news DOT invalid AT web2news DOT net> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019