www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/24/17:20:17

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: direct access of text screen for mode 0x03
Date: Tue, 24 Dec 1996 16:10:44 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 41
Message-ID: <32C07103.305F@cs.com>
References: <32C0B210 DOT 1BC6 AT zip DOT com DOT au>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp211.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dean wrote:
> 
> Can I directly access the screen in mode 0x03 (normal text mode) so that
> I can write charicters directly to the screen, and if so (or if not for
> that matter...) ho do I change the default background/foreground colours
> so that I can have different colours all over the place:)
> 
> Also, if I can't acces the screen directly (though I can't really see
> any reason why not) can I still put stuff on the screen without printf
> or whatever?

Read the descriptions of the library functions in <conio.h>.  Browse
their source if you want to see exactly how it is done.  These functions
all do direct video memory writes (and direct BIOS keyboard reads) to
display text.  Note:  the <stdio.h> and <conio.h> functions are NOT
compatible; expect strange results if you try mixing them in the same
display.

Shortcut to conio docs - type the following from DOS:

   info libc funct conio

Library source files are contained in the 'v2/djlsr201.zip' package.
The info documentation reader is in 'v2gnu/txi390b.zip'.
The libc documentation comes with the basic DJGPP distribution.

There are several other text-mode libraries available for DJGPP that use
direct screen writes, such as the DJGPP port of tvision and pdcurses,
and original packages like sword and jlib.  Most of these share the
restrictions that they are not compatible with either <stdio.h> or
<conio.h> functions.

Good luck!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer |
| "We apologize for the inconvenience."| Fight against proprietary  |
|                      - Douglas Adams | software - support the FSF!|
---------------------------------------------------------------------

- Raw text -


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