Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!husc6!ut-sally!ut-ngp!ayac071 From: ayac071@ut-ngp.UUCP (William T. Douglass) Newsgroups: comp.sys.ibm.pc Subject: Re: Help with ANSI escape sequences Message-ID: <5677@ut-ngp.UUCP> Date: Thu, 23-Jul-87 10:56:04 EDT Article-I.D.: ut-ngp.5677 Posted: Thu Jul 23 10:56:04 1987 Date-Received: Sat, 25-Jul-87 07:22:10 EDT References: <1966@tekigm2.TEK.COM> <6365@eddie.MIT.EDU> Organization: UTexas Computation Center, Austin, Texas Lines: 25 In article <6365@eddie.MIT.EDU> rassilon@eddie.MIT.EDU (Brian Preble) writes: >I am writing a program in Turbo Pascal in which I need to read in lines of >text containing ANSI escape sequences. I have no problem reading these, >however, WRITELN will not behave correctly. Instead of clearing the screen, >or changing the text colors, or whatever, ESCAPE is displayed as a left >arrow. How do I get Turbo to do the right thing? (Do I need to send the >text in raw mode or something?) If you are using the PC-DOS version of TP, then write (should avoid writeln, unless you want a CR-LF written to the screen) is being implemented through the bios screen handler, bypassing DOS and the ANSI.SYS driver. I suggest trying the {$P1} compiler directive, which appears to force TP to use the DOS i/o calls for screen output. I ran into this when trying to implement a ^C handler in a TP program. Seems that the IBM-PC version gets its input without consulting DOS, and handles the ^C character itself. Therefore, setting the int23h address did nothing, as DOS never saw the break character. Re-compiling with the {$Gn} and {$Pn} directives cleared this up. Also, using the generic MS-DOS version proved successful, but left me without all the PC-specific goodies. Hope this is some help. Bill Douglass ayac071@ngp.UUCP (or whatever)