cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/05/04:54:59

Message-ID: <35C81D1A.4E4E6E1E@post.comstar.ru>
Date: Wed, 05 Aug 1998 12:51:38 +0400
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: Comstar Ltd.
MIME-Version: 1.0
To: Nate Eldredge <nate AT cartsys DOT com>
CC: Jeff Williams <jeffw AT darwin DOT sfbr DOT org>, djgpp AT delorie DOT com
Subject: Re: 80x87 detection in DJGPP programs
References: <199808041419 DOT JAA10555 AT kendall.> <35C74A9B DOT BE7C0A06 AT cartsys DOT com>


Nate Eldredge wrote:

> Jeff Williams wrote:
> >
> > -:
> > -: > So my question is: how can I detect a 80x87 in a DJGPP program?
>

int fpu_detect(){
char c;
outportb(0x70,0x14);
c=inportb(0x71);
if (c&0x1)
  { printf("FPU present\n");
    return(1);
  }
else
  { printf("FPU absent\n");
    return(0);
  }
}

Hope this help.

- Raw text -


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