, , .

:

AH

4Fh

 

AL

10h

 

BL

02h

:

AL

4Fh - ;

 

AH

0, ,

1

 

BH

:

00h - ON ( )

01h - STANDBY ( )

02h - SUSPEND ( )

04h - OFF ( )

08h - REDUSED ON ( )

POWER, 7.3, VBE Power Management. POWER, , . , VBE Power Management, . .

7.3. POWER.CPP

#include <stdio.h>

#include <conio.h>

#include <dos.h>


//

void main(void);

int SetPowerState( unsigned char );

int GetPowerState( unsigned char* );

int AnalyseResult(union REGS);

int PowerCapabilities( unsigned char*, unsigned char*,

unsigned char*);


#define ON 0x00

#define OFF 0x04

#define STANDBY 0x01

#define SUSPEND 0x02

#define REDUCED 0x08


//===========================================================

//

//===========================================================

void main(void) {


int uiResult;

unsigned char ucMode, ucModes,

ucMinorVer, ucMajorVer;