Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rice!uw-beaver!ubc-cs!alberta!dvinci!lowey From: lowey@dvinci.usask.ca (Kevin Lowey) Newsgroups: comp.lang.pascal Subject: Re: Reverse Video in Turbo Pascal Message-ID: <1989Oct23.012355.15824@dvinci.usask.ca> Date: 23 Oct 89 01:23:55 GMT References: <40862@bu-cs.BU.EDU> Organization: University of Saskatchewan Lines: 45 From article <40862@bu-cs.BU.EDU>, by austin@bucsf.bu.edu (Austin Ziegler): > Tom> A better way is to set > Tom> directvideo := false; > [because it then allows ANSI to decode the strings] (I know you aren't Tom, but I'll mention this here) The directvideo flag only determines whether the CRT unit uses direct screen writes, or BIOS calls. Since the ANSI escape sequences only work when sending output to the Standard Output (DOS) the Directvideo flag has no effect on whether ANSI is used or not. If you use the CRT unit, ANSI.SYS is not available. However, if you assign a file to the file name '' (two quotes with nothing in between) then that file is associated with the standard input by RESET, or the Standard Output with REWRITE. That way you could do things like: ASSIGN (STDIO,''); RESET (STDIO); write (stdio,'This goes through ',chr(27),'[1mANSI.SYS'); write ('This goes through the CRT unit'); However, I don't know how wise it is to mix CRT and ANSI in the same program. I recommend using either one, or the other, but not both. > Even better would be to use the CRT unit, and, if you know the colors > (which most of us do), actually set the colors using TextBackground and > TextColor. In your own unit, include the following three functions > If anyone is interested, I've created a unit that emulates most of the CRT unit functions using ANSI.SYS. The only things that are not emulated are because of limitations in ANSI.SYS, like no ability to set the left and right margins so scrolling scrolls everything on a line. However most things work ok. The file is called KVL_ANSI.PAS and is available from my OPUS bulletin board at (306) 966-4857. People can download this file on the first call, or file request it from another Fidonet BBS. The unit is about 23K. I will be away for two weeks, but after then I can send it through mail to people who request it. - Kevin Lowey @ 140/43 - LOWEY@SASK.USASK.CA - ...!alberta!dvinci!lowey