Casio IT-2000W User Manual

Page 296

Advertising
background image

296

Acquisition of Power Status

Application can acquire current power status by calling APM BIOS through the interrupt INT15h.

The following power statuses can be acquired by using the method.

 AC line status
 Battery status
 Battery flag
 Remaining battery life - percentage of charge
 Remaining battery life - time unites

The functions detailed below will acquire the power statuses stated above.

Acquisition of Power Status

INT15h

Input:

AH = 53h
AL = 0Ah
BX = 0001h

Output:
If function successful:

Carry = 0
BH = AC line status

00h Off-line
01h On-line
02h On backup power
FFh Unknown
All other values are reserved.

BL = Battery status

00h High
01h Low
02h Critical
03h Charging
FFh Unknown
All other values are reserved.

CH = Battery flag

bit 0 = 1 High
bit 1 = 1 Low
bit 2 = 1 Critical
bit 3 = 1 Charging
bit 7 = 1 No system battery
All other bits are reserved.
FFh Unknown
All other values are reserved.

CL = Remaining battery life-percentage of charge

0 to 100 : Percentage of the battery charging, 100 represents full

charge in battery.

FFh : Unknown
All other values are reserved.

Advertising