File:  [OS/2 SDKs] / os2sdk / demos / examples / version / version.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:24 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
Microsoft OS/2 SDK 03-01-1988

/*
 * Example of DosGetVersion usage
 *
 * This program gets the DOS version and revision numbers.
 * It works as a Family API Program.
 *
 * Compile as: cl -AL -Lp -G0 version.c
 *
 * Created by Microsoft Corp. 1986
 */

#include  <os2def.h>
#define INCL_DOSMISC
#include  <bsedos.h>

main()
{
	USHORT VersionWord;
	USHORT major, minor;

	DosGetVersion(&VersionWord);	/* Call DOS to get the version */

	major = VersionWord >> 8;           /* High byte is major version */
	minor = VersionWord & 0xff;         /* Low byte is minor revision */

	printf("Version %d.%d\n", major, minor);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.