Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!ugle.unit.no!ugle.runit.sintef.no!thoger From: thoger@solan.unit.no (Terje Th|gersen) Newsgroups: comp.lang.pascal Subject: Re: Ansi Color Message-ID: Date: 21 Apr 91 16:15:50 GMT References: <7328@vice.ICO.TEK.COM> Sender: news@ugle.unit.no Organization: Institute of Physical Chemistry, NTH Lines: 41 In-Reply-To: bobb@vice.ICO.TEK.COM's message of 21 Apr 91 05:35:34 GMT In article <7328@vice.ICO.TEK.COM> bobb@vice.ICO.TEK.COM (Bob Beauchaine) writes: In article <1991Apr20.143655.13621@uwasa.fi> ts@uwasa.fi (Timo Salmi) writes: > Q: How to get ansi control codes working in Turbo Pascal writes? >Occasionally I have seen it suggested that one should just set > DirectVideo := false; >This is a popular misconception. It won't produce the desired >result. > Being one of the perpetrators of this hoax, I would like to know why this solution doesn't work. I checked the manual; it says that setting the DirectVideo variable false coerces Turbo into using Bios for all write/writeln statements. I assume the Ansi driver intercepts the video interrupt for output. What gives? Is Ansi.sys not intercepting the correct vector, or does Turbo use a "non standard" output method? BTW, the results are the same using Ansi.com, PC Magazine's enhanced ansi driver. TP uses one of three different Writeln's, depending on the settings of DirectVideo and whether Crt is USED. CRT + DirectVideo = TRUE : Directly to screen memory. CRT + DirectVideo = FALSE : Int 21h, Fn 40h, "Write File" with con as the "file" No CRT : Int 21h, fn 09h, "Display String", the most basic "write" of them all.. Regards, -Terje -- ____________________________________________________________________________ thoger@solan.unit.no | Institute of Physical Chemistry THOGER AT NORUNIT.BITNET | Div. of Computer Assisted Instrumental Analysis | Norwegian Institute of Technology