www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/02/08/07:05:30

From: aiy AT mundil DOT cs DOT mu DOT OZ DOT AU (Andrew Ian YOUNGER)
Subject: Detecting ANSI.SYS
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Tue, 8 Feb 94 22:17:23 EDT

Ok, I have a problem that somebody out there should be able to smooth out
without much effort, but it's got me stumped.  I can't detect if ANSI.SYS
if installed in the system.  The prescribed method (according to Microsoft),
is what I've written below ....

#include <stdio.h>
#include <dos.h>

int main()
{
    union REGS  regs;

    regs.x.ax = 0x1A00;
    int86(0x2F, &regs, &regs);
    if (regs.h.al = 0xFF)
        printf("ANSI installed.\n");
    else
        printf("ANSI is not installed.\n");
    return 0;
}

But all I get is this error ..

Unsupported INT 0x2f
Exception 47 (0x2f) at eip=4070
eax=00001a00 ebx=7ffffc18 ecx=0000192f esi=00000000 edi=7ffffc24
ebp=7ffffbf0 esp=7ffffbd4 cs=d8 ds=48 fs=48 gs=48 ss=48 cr2=00007000
Call frame traceback EIPs:
  0x00004070
  0x000011ef

Any ideas anybody??

Thanks
Andrew Younger
(aiy AT mundil DOT cs DOT mu DOT OA DOT AU)



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019