Path: utzoo!yunexus!maccs!cs3b3aj From: cs3b3aj@maccs.McMaster.CA (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc Subject: Re: Detecting ANSI.SYS Summary: Two methods for IBM-compatible machines Message-ID: <2301@maccs.McMaster.CA> Date: 2 Apr 89 01:17:48 GMT Article-I.D.: maccs.2301 References: <1920@dataio.Data-IO.COM> Reply-To: cs3b3aj@maccs.UUCP (Stephen M. Dunn) Organization: McMaster U., Hamilton, Ont., Can. Lines: 25 I know of a couple of methods. If you know where the screen memory is, you can send a sequence of characters (including some cursor placement strings) which print a recognizable pattern somewhere on the screen, and then look through memory to see if it's where it should be. If so, you know that ANSI is installed. If you know you're working on a machine with an IBM-compatible BIOS, you can do something similar even if you don't know where screen memory is. Repeat the following a few times: use an ANSI escape sequence to move the cursor somewhere, then do a BIOS call (int 10h, function 3) to read the cursor position and see if it's the same. If the cursor ends up where you expect it, you've got ANSI. Alternatively, you could print a string including some escape sequences and then use int 10h function 8 to read what's in screen memory and see if it's what you expect. Hope this helps. Regards -- ====================================================================== ! Stephen M. Dunn, cs3b3aj@maccs.McMaster.CA ! DISCLAIMER: ! ! I always wanted to be a lumberjack! - M.P. ! I'm only an undergrad ! ======================================================================