TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: David Etheredge
from: Mike Stella
date: 1995-03-24 12:16:40
subject: Bios calls / text color

A creature called David Etheredge screamed at All:

 DE> Greetings!

 DE> In transferring an application from Dos to OS/2, I noticed
 DE> that conio.h in Cset does not have the textcolor(),
 DE> textbackground(), and other functions that control color in
 DE> the text mode. Is this intentional? Can I use Bios calls/
 DE> interrupts to set the screen attributes under OS/2? If this
 DE> is not allowed, how do I set colors and background outside
 DE> of the pm / wp systems (i.e. in a full screen mode such as
 DE> when booting from the a drive boot disk)? 

   I just use ansi colours here.  I defined strings like:

#define BLACK         "\033[0;30m"
#define RED           "\033[0;31m"
#define GREEN         "\033[0;32m"
#define BROWN         "\033[0;33m"
#define BLUE          "\033[0;34m"
#define MAGENTA       "\033[0;35m"
#define CYAN          "\033[0;36m"
#define GREY          "\033[0;37m"
#define DARKGREY      "\033[1;30m"
#define LIGHTRED      "\033[1;31m"

   etc...

   And just do:

   VioWrtTTY(RED "This is in RED!",22,0);

   .\\ike Stella
--- ShadowMail/2 1.00
* Origin: Shadowland/2 - 203.456.1103 (V34) & 203.456.4244 (V32) (1:327/138)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 327/138 469 451 324/288 3615/50 396/1 270/101 105/103 42 712/515
@PATH: 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.