C Language Development Kit/Functions/VersionOS

From OptiWiki

Jump to: navigation, search
Description This function returns the version of the currently loaded operating system. The version is returned in an 8 character long string, and is terminated by the null character '\0'. 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, H13
XBD PX25

Examples of version strings are:

CBWV0131 = PHL2700 operating system, version 1.31

CBX20231 = PHL1300 operating system, special version 2023 revision 1

Syntax
void version_os(char os[9]);
Arguments
char os[9]
Array of 9 characters into which the version of the currently loaded operating system is written.
Returns None
Remarks None
Example
#include "lib.h"
#include <stdio.h>
 
void main( void )
{
    static char os[8+1], rom[8+1];
    int key;
 
    resetkey();
    printf("\fPress ENT key");
    while( 1 )
    {
        if( (key = getchar()) != EOF)
        {
            resetkey();
            switch( key )
            {
                case ENT_KEY:
                    sound( TSTANDARD, VHIGH, SHIGH, 0);
                    version_rom( rom );
                    version_os( os );
                    printf("\nROM = %s", rom);
                    printf("\nO/S = %s", os);
                    break;
                default:
                    sound( TCLICK, VHIGH, SLOW, 0);
                    break;
            }
        }
        idle();
    }
}


Views
Personal tools