Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ANSI detection

26 views
Skip to first unread message

Cyril Plisko

unread,
Jan 31, 1992, 2:21:58 PM1/31/92
to
Is there any way to my program to detect ANSI.SYS in memeory?
Or some other ANSI emulator ?

Thanx in advance,
Cyril Plisko.
Internet: i...@etchq.msk.su

Timo Salmi

unread,
Jan 31, 1992, 5:17:06 PM1/31/92
to
In article <AAM7Q...@etchq.msk.su> i...@etchq.msk.su writes:
>Is there any way to my program to detect ANSI.SYS in memeory?
>Or some other ANSI emulator ?

Yes. You write an ansi sequence on the screen, and test the result
directly from the CRT because they will differ if the sys is loaded
or not. In MdDos 5.0 you can also use interrupts as explained by
some recent PC-Magazines number. If you need just the program, not
the code you can find it in garbo.uwasa.fi:/pc/ts/tsbat31.zip. If
you program in Turbo Pascal you can find the routine in my TP units
collection garbo.uwasa.fi:/pc/ts/tspa26*.zip.

"If you do not know how to go about getting this package you are
welcome to email me for the prerecorded garbo.uwasa.fi instructions,
Keith Petersen (w8...@wsmr-simtel20.army.mil) for SIMTEL20
information, or Craig Warren (c...@deakin.oz.au) for Oceanian garbo
mirror information. North American users are advised first to
search on SIMTEL20 or its mirror wuarchive.wustl.edu. Oceanian
users are referred to rana.cc.deakin.oz.au (for recent files)."

...................................................................
Prof. Timo Salmi (Temporarily as sa...@finsun.csc.fi)
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.87.1
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: t...@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

Chris Jennings

unread,
Feb 1, 1992, 3:56:02 AM2/1/92
to
On page 132 of the Microsoft MS-DOS programmer's reference is a full
description of the MultiPlex Interrupt (INT 2Fh) which will do what u want for
ANSI.SYS -> simply set AX = 1A00h then INT2Fh. If AL =0FFh after the
interrupt, then ANSI has been loaded, if AL=0 it hasn't.

Unfortunately this does not work with all ANSI drivers, such as EANSI.SYS
supplied by ULTRA-VGA - which is annoying when these are touted as extensions
of the ANSi.SYS functions.
Chris jennings
Alice Springs
Australia.

UUCP: {munnari}!jabaru!anthos!tanus!11725
INET: 11...@tanus.oz.au

Ralf....@b.gp.cs.cmu.edu

unread,
Feb 1, 1992, 8:14:12 AM2/1/92
to
In article <4...@jabaru.oz.au>, 11...@tanus.cec.edu.au (Chris Jennings) wrote:
}On page 132 of the Microsoft MS-DOS programmer's reference is a full
}description of the MultiPlex Interrupt (INT 2Fh) which will do what u want for
}ANSI.SYS -> simply set AX = 1A00h then INT2Fh. If AL =0FFh after the
}interrupt, then ANSI has been loaded, if AL=0 it hasn't.
}
}Unfortunately this does not work with all ANSI drivers, such as EANSI.SYS

Note that the function did not exist prior to DOS 4.0, and wasn't documented
until DOS 5.0. In earlier versions, MSDOS checked whether
segment(INT 29h) > segment(INT 20h)
and assumed ANSI.SYS was present if so.

--
{backbone}!cs.cmu.edu!ralf ARPA: RA...@CS.CMU.EDU FIDO: Ralf Brown 1:129/26.1
BITnet: RALF%CS.CMU.EDU@CARNEGIE AT&Tnet: (412)268-3053 (school) FAX: ask
DISCLAIMER? Did | Lunsford's Rule of Scientific Endeavor: The simple
I claim something? | explanation always follows the complex solution.

Group I

unread,
Jan 31, 1992, 4:07:31 PM1/31/92
to
>Is there any way to my program to detect ANSI.SYS in memeory?
>Or some other ANSI emulator ?

Try getting a hold of the INFOPlus program. It includes complete
source code for itself (INFOPlus is a norton SI like program, telling
you what is inside your computer). It detects ANSI.SYS, I believe
through a MultiPlex call, DOS int 2fh, though I cannot be more specific.

Good Luck.

Scott G.

Timo Salmi

unread,
Feb 2, 1992, 1:17:10 PM2/2/92
to
In article <1992Jan31.2...@maccs.dcss.mcmaster.ca> cs4c...@maccs.dcss.mcmaster.ca (Group I) writes:
>Try getting a hold of the INFOPlus program. It includes complete

109667 Jan 1 01:50 garbo.uwasa.fi:/pc/turbopas/ifp1s150.zip

"If you do not know how to go about getting this package you are
welcome to email me for the prerecorded garbo.uwasa.fi instructions,
Keith Petersen (w8...@wsmr-simtel20.army.mil) for SIMTEL20
information, or Craig Warren (c...@deakin.oz.au) for Oceanian garbo
mirror information. North American users are advised first to
search on SIMTEL20 or its mirror wuarchive.wustl.edu. Oceanian
users are referred to rana.cc.deakin.oz.au (for recent files)."

...................................................................
Prof. Timo Salmi

I. Yermish

unread,
Feb 2, 1992, 10:10:42 PM2/2/92
to

May I suggest the BATCHMAN.COM utility from PC Magazine, available from
the PC MagNet area on Compu$erve. In addition to detecting if ANSI.SYS is
present it will do all kinds of neat things useful within a .BAT file.

--
Ira Yermish, Ph.D. (215)-660-1636
iyer...@sju.edu

Jon Freivald

unread,
Feb 2, 1992, 5:25:55 PM2/2/92
to
i...@etchq.msk.su (Cyril Plisko) writes:

This should work for ANSI.SYS - emulators I can't help you with I'm
afraid...

Interrupt 2Fh, function 1Ah, subfunction 00h

mov ax,1A00h
int 2Fh
cmp al,FFh
je ANSIInstalled

This requires DOS 4.0 or higher I'm afraid.

Jon

=============================================================================
Jon Freivald ( j...@jaflrn.uucp )
Nothing is impossible for the man who doesn't have to do it.
=============================================================================

Alon Ziv

unread,
Feb 14, 1992, 1:49:03 AM2/14/92
to

The easiest (IMHO) way to find if an ANSI-like driver is installed
is by sending the RCP (Report Cursor Position) code to stdout, then checking
if you get the expected reply from stdin. This does not depend on DOS or
driver versions, and should work for any decent driver.

-az
--
Internet: s286...@tx.technion.ac.il . __
I'M A STUDENT: When I'm wrong, it's my teacher's fault _| /
(when I'm right, why, I take all credit!) / | /_
Alon Ziv

0 new messages