C Language Development Kit/Functions/GetOsVersion

From OptiWiki

Jump to: navigation, search
Availability All terminals
Description This function returns a pointer to the version of the currently loaded operating system. The pointer that is returned, points to a zero terminated character string. The first and third character of the version string defines the terminal type, the second character defines the software type (in this case B, operating system software)
Code Terminal
CBG PHL1700-1MB
CBH PHL1700-2MB
CBQ DWT7133
CBW PHL2700
CBX PHL1300
LBB OPL9723, OPL9725, OPL9726, OPL9727
LBC OPL9724
LBD OPL9728
LBF OPL9723R
LBK DCL1530
LBN DCL1538
LBO OPL9712
LBP OPL9713
XBA OPH1003
XBC OPH1004

Examples of version strings are: CBWV0131 = PHL2700 operating system, version 1.31 CBX20231 = PHL1300 operating system, special version 2023 revision 1

Syntax
char *GetOsVersion( void );
Arguments None
Returns A pointer to a zero terminated string with the version number.
Remarks None
Example
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    int key;
 
    resetkey();
    printf("\fPress ENT key");
    for(;;)
    {
        if( (key = getchar()) != EOF)
        {
            resetkey();
            switch( key )
            {
                case ENT_KEY:
                    sound( TSTANDARD, VHIGH, SHIGH, 0);
                    printf("\nROM = %s", GetBootVersion());
                    printf("\nO/S = %s", GetOsVersion());
                    break;
                default:
                    sound( TCLICK, VHIGH, SLOW, 0);
                    break;
            }
        }
        idle();
    }
}


Views
Personal tools