delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/14/15:30:18

Date: Thu, 14 Oct 1999 16:51:17 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: DPMI identification
In-Reply-To: <9910140430.AA16934@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.991014164453.27970A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 13 Oct 1999, Charles Sandmann wrote:

> I'll consider it - what do all the other vendors provide for this 
> information?  Will DPMI crash on some host if you try this call?
> I hate to open a can of worms.

Right, we don't want no steenking worms around here ;-)

So I'd like to ask people who have access to various non-standard 
platforms to compile and run the small test program below and report the 
results to me.  (Please do NOT post to the news group; write to me 
directly, and I will summarize.)

Environments to which I don't have access, and which are therefore more 
interesting: OS/2, Linux/DOSEmu, Caldera's DR-DOS with its own DPMI 
server, 386Max.

Please report the version of the OS and the DPMI host with the results.

Thanks in advance.

------------------------ cut here ------------------------------
#include <stdio.h>
#include <dpmi.h>

int main (void)
{
  unsigned char cap[128];
  int flags;
  int status = __dpmi_get_capabilities (&flags, cap);

  if (status == -1)
    printf ("31h/0401h FAILED!!  DPMI error code: 0x%x\n", __dpmi_error);
  else
    {
      printf ("SUCCESS!!  FLAGS: 0x%x\n", flags);
      printf ("DPMI Host version: %d.%d\n", cap[0], cap[1]);
      printf ("DPMI Host vendor string: `%s'\n", cap + 2);
    }

  return 0;
}

- Raw text -


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