Annotation of os2sdk/demos/examples/version/version.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Example of DOSGETVERSION usage
        !             3:  *
        !             4:  * This program gets the DOS version and revision numbers.
        !             5:  * It works as a Family API Program.
        !             6:  *
        !             7:  * Compile as: cl -AL -Lp -G0 version.c
        !             8:  *
        !             9:  * Copyright (C) Microsoft Corp. 1986
        !            10:  */
        !            11: 
        !            12: #include  <doscalls.h>
        !            13: 
        !            14: main()
        !            15: {
        !            16:        unsigned int VersionWord;
        !            17:        unsigned int major, minor;
        !            18: 
        !            19:        DOSGETVERSION(&VersionWord);    /* Call DOS to get the version */
        !            20: 
        !            21:        major = VersionWord >> 8;           /* High byte is major version */
        !            22:        minor = VersionWord & 0xff;         /* Low byte is minor revision */
        !            23: 
        !            24:        printf("Version %d.%d\n", major, minor);
        !            25: }

unix.superglobalmegacorp.com

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