Mail Archives: djgpp/1997/09/12/12:57:33
From: | "Andreas Björk" <97andbj AT ostrabo DOT uddevalla DOT se>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | How can i create a working virtual screen i DJGPP?
|
Date: | Fri, 12 Sep 1997 18:14:05 +0200
|
Organization: | Algonet/Tninet
|
Lines: | 61
|
Message-ID: | <34196A4D.1539879@ostrabo.uddevalla.se>
|
NNTP-Posting-Host: | du211-92.ppp.algonet.se
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
How can i easy create a virtual screens and then flip them to the
VGA memory (0xA0000)?? Is there anyone out there who has
good routines for it??
I have test to this, but i get error messages when i execute the EXE
file.
The file compiles and links as it should.
The error message looks like this:
------------------------------------------------------------------------
Exiting due to signal SIGSEGV
General Protection Fault at eip=000126b9
eax=000a0000 ebx=00060140 ecx=00003e80 edx=0000fa00 esi=00067000
edi=000a0000
ebp=0005e4f8 esp=0005e4ec program=D:\DJGPP\PRJ\GRAF\TEST.EXE
cs: sel=00a7 base=83413000 limit=0008ffff
ds: sel=00af base=83413000 limit=0008ffff
es: sel=00af base=83413000 limit=0008ffff
fs: sel=0087 base=000222f0 limit=0000ffff
gs: sel=00c7 base=00000000 limit=ffffffff
ss: sel=00af base=83413000 limit=0008ffff
Call frame traceback EIPs:
0x000126b9
0x0000167d
0x000016a6
0x0000e3e6
------------------------------------------------------------------------
parts of my code:
void SetUpVirtual()
{
unsigned char *ScreenBuf = (unsigned char*) calloc(64000,1);
if(ScreenBuf == NULL)
{
SetMode(0x3);
cout << "not enough memory available, exiting program..";
exit(1);
}
}
void Cls(unsigned char Col,unsigned char *Where)
{
memset(Where,Col,64000);
}
void Flip()
{
memcpy(vga,ScreenBuf,64000);
}
-------------------------------------------------------------
When i try to flip the virtual screen to the VGA mem i get the error
message earlier in the document. If i don't use the Flip function the
file executes as it should.. but then i don't work i will.
So can anyone help me please...
- Raw text -