delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/06/19:35:25

Message-ID: <378D1DEA.D0E6C7FF@go.ro>
Date: Thu, 15 Jul 1999 02:31:54 +0300
From: Radu Georgescu aka skoola <skoola AT go DOT ro>
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: VBE 2.0 Pmode Interface
References: <7ocufb$lap$1 AT news DOT okay DOT net>
Reply-To: djgpp AT delorie DOT com

> Has anybody done  _easy_to_see_thru_ VESA routines.
> I can't seem to get the Pmode functions working and I'm not sure whether I
> set up the I/O correctly or whatever.
> I'm not really familiar with pmode and flat model code, descriptors, etc.

void initg(void)
{
FILE *f;
char *a;
short cfg;
__dpmi_meminfo mi;
union REGS inr,outr;
f=fopen("config.ini","r");
fscanf(f,"%d",&cfg);
fclose(f);
inr.w.ax=0x4f02;
inr.w.bx=0x101|0x4000;
int386(0x10,&inr,&outr);
mi.size=(unsigned long)307200*4;
mi.address=(unsigned long)cfg<<20;
__dpmi_physical_address_mapping(&mi);
__djgpp_nearptr_enable();
start=mi.address+__djgpp_conventional_base;
}

this should work;  in config.ini should be the adress (in megabytes) of the
linear frame buffer, that's something i was too lazy to code :)

- Raw text -


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