Mail Archives: djgpp/2001/01/27/20:51:43
From: | "David Krmpotic" <David DOT Krmpotic AT guest DOT arnes DOT si>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | switching to 320 x 200 mode in DJGPP
|
Date: | Sun, 28 Jan 2001 02:40:41 +0100
|
Organization: | ARNES
|
Lines: | 57
|
Message-ID: | <94vta8$pea$1@planja.arnes.si>
|
NNTP-Posting-Host: | mb3-13a.dial-up.arnes.si
|
X-Newsreader: | Microsoft Outlook Express 4.72.3110.1
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
simple newbie problem:
I'm using DJGPP and I don't know how to use 320x200 graphic mode...
here's my example:
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <dpmi.h>
void* vga = (void*)0xa000;
void setMCGA() {
__dpmi_regs r;
r.h.ah = 0x00;
r.h.al = 0x13;
__dpmi_int (0x10, &r);
}
void setText() {
__dpmi_regs r;
r.h.ah = 0x00;
r.h.al = 0x03;
__dpmi_int (0x10, &r);
}
void clearScreen(unsigned char col)
memset(vga, col, 320*200);
}
/*void putPixel (int x, int y, unsigned char col) {
memset(vga + x + (y * 320), col, 1);
}*/
int main() {
setMCGA();
clearScreen(4);
setText();
return 0;
}
it cold boots computer... when clearScreen function is called....
I believe you'll see where the problem lies in no time... so ....
please :)
david
- Raw text -