From: Endlisnis 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: <35FED344 DOT A9C2EE7F AT sprynet DOT com> NNTP-Posting-Host: fctnts10c63.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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