www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/11/10:31:26

From: Tudor <tudor AT cam DOT org>
Newsgroups: comp.os.msdos.djgpp,alt.msdos.programmer
Subject: Re: DOS application under Windows
Date: Fri, 10 Jan 1997 22:38:39 -0800
Organization: Communications Accesibles Montreal
Lines: 36
Message-ID: <32D7356F.6A8A@cam.org>
References: <32d54cac DOT 6765513 AT news DOT teaser DOT fr>
Reply-To: tudor AT cam DOT org
NNTP-Posting-Host: dynamicppp-167.hip.cam.org
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jean-Pierre Delprat wrote:
> 
> Hello,
> 
> Is there a way to determine :
> - if a DOS application is ran under Windows
::int 0x2F, ax=0x1600::
this code is taken from the allegro start-up code by Shawn Hargreaves:
............
__dpmi_regs r;
[........]      
r.x.ax = 0x1600;           /* check if running under windows */
      __dpmi_int(0x2F, &r);
      if ((r.h.al == 0) || (r.h.al == 1) ||
          (r.h.al == 0x80) || (r.h.al == 0xFF)) {
         windows_version = windows_sub_version = 0;
      }
      else {
         windows_version = r.h.al;
         windows_sub_version = r.h.ah;
[.........]

> 
> Thanks very much,

-- 
tudor 'at' cam 'dot' org
yoda69 'at' hotmail 'dot' com
http://www.cam.org/~tudor

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d-(--) s(-):(+) a? C+ UL>++++ P L>+++++ E- W++ N o K---(----) w---
O---- M-- V-? PS+++ PE Y PGP t+ 5-- X+++>++++ R tv b+ DI D+ G e->++
h>++ r- y>+++++ 
------END GEEK CODE BLOCK------

- Raw text -


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