Xref: utzoo comp.lang.c:27336 comp.sys.ibm.pc.programmer:651 Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!asuvax!noao!arizona!dms From: dms@cs.arizona.edu (David Michael Shackelford) Newsgroups: comp.lang.c,comp.sys.ibm.pc.programmer Subject: Re: TC textcolor(RED) problem Summary: textcolor requires use of cprintf instead of printf Message-ID: <192@caslon.cs.arizona.edu> Date: 29 Mar 90 20:31:09 GMT References: <1990Mar28.224220.16285@xenitec.on.ca> Followup-To: poster Distribution: na Organization: U of Arizona CS Dept, Tucson Lines: 20 In article <1990Mar28.224220.16285@xenitec.on.ca>, timk@xenitec.on.ca (Tim Kuehn) writes: > This is annoying - I want to display text on my VGA screen in different > colors. Supposedly the following Turbo C code segment should show me > a red 'hello' on the screen. It doesn't, but shows me the text in the current > default color instead: [ #include's omitted ] > main() > { > textcolor(RED); > printf("hello\n"); > } TC implements a special version of the printf function, cprintf. It uses the same arguments as printf, but uses the attributes set by textcolor and textbackground. There are also several other 'console' versions of i/o functions -- see the reference manual for specifics. Dave. dms@cs.arizona.edu