[net.micro.pc] Inverse Text from Turbo

schnathm@unido.UUCP (09/23/85)

Can anybody tell me how to print inverse text from a Turbo-Pascal
program running on an XT ?
It seems, they only offer high- or lowlight.

Stefan Schnathmeier  ( seismo!mcvax!unido!schnathm )

rje@cae780.UUCP (Bob Evans) (09/25/85)

In article <10000020@unido.UUCP>, schnathm@unido.UUCP writes:
> Can anybody tell me how to print inverse text from a Turbo-Pascal
> program running on an XT ?
> It seems, they only offer high- or lowlight.
> 

The only way that I have found to do this is with the DOS interrupt $21
call using the attribute settings as described in the DOS 2.1 manual.
I have a set of procedures that handle this. If there is interest I could
post them to net.sources, or you can e-mail to me for a copy.

Bob


FROM:   Robert J. Evans, CAE Systems Division of Tektronix, Inc.
UUCP:   tektronix!teklds!cae780!rje
	{ihnp4, decvax!decwrl}!amdcad!cae780!rje 
        {nsc, hplabs, resonex, qubix, leadsv}!cae780!rje 
USNAIL: 1333 Bordeaux Drive, Sunnyvale, CA  94089 [until we move ... soon]
AT&T:   (408)745-1440 [until we move .. soon]


 

krausej@stolaf.UUCP (James J. Krause) (09/30/85)

> Can anybody tell me how to print inverse text from a Turbo-Pascal
> program running on an XT ?
> It seems, they only offer high- or lowlight.
> 
> Stefan Schnathmeier  ( seismo!mcvax!unido!schnathm )

There are standard procedures for changing the color of text in Turbo
Pascal.  Look in the section of your manual titled, "IBM PC GOODIES."  The
procedures are TEXTCOLOR(color) and TEXTBACKGROUND(color).  I just tested
them with both versions 2 and 3, and I could produce inverse text with only
a single quirk: if I used WRITELN() instead of just WRITE(), the line after the
inverse text would also be inverted.  You can invert text by setting the
background to white and the characters to black.  Since you have an XT, you
shouldn't have any compatibility problems.... :-)
I have a color graphics adapter, so I don't know exactly how these
procedures work with a monochrome board.

					James Krause
				...!ihnp4!stolaf!krausej

jph@whuxlm.UUCP (Holtman Jim) (10/01/85)

> In article <10000020@unido.UUCP>, schnathm@unido.UUCP writes:
> > Can anybody tell me how to print inverse text from a Turbo-Pascal
> > program running on an XT ?
> > It seems, they only offer high- or lowlight.
> > 
> 
> The only way that I have found to do this is with the DOS interrupt $21
> call using the attribute settings as described in the DOS 2.1 manual.
> I have a set of procedures that handle this. If there is interest I could
> post them to net.sources, or you can e-mail to me for a copy.
> 
> Bob
> 
> 
> FROM:   Robert J. Evans, CAE Systems Division of Tektronix, Inc.
> UUCP:   tektronix!teklds!cae780!rje
> 	{ihnp4, decvax!decwrl}!amdcad!cae780!rje 
>         {nsc, hplabs, resonex, qubix, leadsv}!cae780!rje 
> USNAIL: 1333 Bordeaux Drive, Sunnyvale, CA  94089 [until we move ... soon]
> AT&T:   (408)745-1440 [until we move .. soon]
> 
> 
>  

for reverse video (or any other combination) use the TextColor
and TextBackground functions. For inverse video, use;

	TextColor(black);
	TextBackground(white);

40651275@sdcc13.UUCP (40651275) (10/09/85)

     To use inverse characters:
       Get into the text graphiocs mode via TEXTMODE(C80)
       set the background color to white    TEXTBACKGROUND(WHITE)
       set the forground color to black     TEXTCOLOR(BLACK)

       This is the method I usually use, although you can also
       set the attribute byte on the screen (via a i/o driver).

       doubleplusgood