Mail Archives: djgpp/1996/12/24/17:20:17
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 -