Mail Archives: djgpp/2001/01/15/13:06:31
From: | "Stefan Viljoen" <Stefan_Viljoen AT excite DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: ASCII GUI
|
Date: | Mon, 15 Jan 2001 19:57:55 +0200
|
Organization: | The South African Internet Exchange
|
Lines: | 35
|
Message-ID: | <93vde1$2fb$1@ctb-nnrp2.saix.net>
|
References: | <57n86.4082$wt2 DOT 26425 AT news1 DOT oke DOT nextra DOT no>
|
NNTP-Posting-Host: | psw53-ov3-p23.ec.saix.net
|
X-Trace: | ctb-nnrp2.saix.net 979581185 2539 155.239.172.23 (15 Jan 2001 17:53:05 GMT)
|
X-Complaints-To: | abuse AT saix DOT net
|
NNTP-Posting-Date: | 15 Jan 2001 17:53:05 GMT
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Newsreader: | Microsoft Outlook Express 5.00.2314.1300
|
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Jon <lennier AT online DOT no> wrote in message
news:57n86.4082$wt2 DOT 26425 AT news1 DOT oke DOT nextra DOT no...
> I'm fairly new to programming, and have just started writing a program in
> DJGPP which uses
> an ASCII GUI. The problem is that, it redraws the GUI very slow. Even on
my
> 850 MHZ Athlon, I can see the cursor drawing up the GUI. Currently I use
the
> gotoxy(); function and cprintf(); to draw the GUI.
> But when doing big redraws, it just become too slow, like on another
program
> I made, I used the ASCII character 219 to form a word, which I moved
across
> the screen. This was also terrible slow.
> So, do anyone know of a better way to draw up ASCII graphics without using
> the gotoxy and cprintf?
Directly access video RAM at 0xB800 - there is a simple formula to calculate
linear memory addresses from X,Y pairs. Check my programming page
http://home.intekom.com/rylan/
for examples of directly accessing VGA 320x200x256 graphics memory - this
code can work in 80x25x16 color text mode by simply changing the segment
address from 0xA000 ot 0xB800 and fiddling a little with the formula used to
plot points. Note that you'll need to use assembly to use my method, though!
Regards,
Stefan Viljoen
F/EMS Dispatcher
Potchefstroom F/EMS
http://home.intekom.com/rylan/
- Raw text -