| delorie.com/archives/browse.cgi | search |
| Date: | Thu, 03 May 2001 22:10:18 +0300 |
| From: | "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> |
| Sender: | halo1 AT zahav DOT net DOT il |
| To: | theowl AT freemail DOT c3 DOT hu |
| Message-Id: | <9743-Thu03May2001221018+0300-eliz@is.elta.co.il> |
| X-Mailer: | Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 |
| CC: | djgpp-workers AT delorie DOT com, sandmann AT clio DOT rice DOT edu |
| In-reply-to: | <3AEDD6A5.5176.4B76959@localhost> (theowl@freemail.c3.hu) |
| Subject: | Re: win2000/ntvdm/djgpp (fwd) |
| References: | <3AECA048 DOT 20910 DOT 63E613 AT localhost> <3AEDD6A5 DOT 5176 DOT 4B76959 AT localhost> |
| Reply-To: | djgpp-workers AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp-workers AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
So that I'm sure how to write code which detects NT/W2K, could you
please compile and run the program below on W2K, and tell me what it
prints? Thanks.
#include <stdio.h>
#include <dpmi.h>
#include <dos.h>
int main (void)
{
__dpmi_regs r;
printf ("DOS Version: %.2X.%.2Xh\n", _osmajor, _osminor);
printf ("True DOS Version: %.3Xh\n", _get_dos_version (1));
r.x.ax = 0x1600;
__dpmi_int (0x2f, &r);
printf ("Windows Version: %.2X.%.2Xh\n", r.h.al, r.h.ah);
return 0;
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |