www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/20/11:16:08

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Detecting Operating System in program
Date: Sun, 20 Sep 1998 11:18:18 -0300
Organization: NBTel Internet
Lines: 16
Message-ID: <36050EAA.BC70D580@unb.ca>
References: <Pine DOT SOL DOT 3 DOT 91 DOT 980909102138 DOT 11862B-100000 AT mercury> <35FED344 DOT A9C2EE7F AT sprynet DOT com>
NNTP-Posting-Host: fctnts10c63.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ishpeck wrote:
> > How do we write a program that can detect the environment that it's
> > running in (Win95, Win98, Win3x, MSDOS)?

> #ifdef WIN95
> #ifdef DOS
> 
> Something like that... I'm not exactly sure about the details though.
	I think he meant at run-time, not compile-time.
-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca


And after it works, you can then tell me your
wrong.  You can call a real-mode interrupt from inline assembly, I think it is
safer for some interrupts to use __dpmi_int, but not normal ones (like 0x10).

-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca

- Raw text -


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