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
BL
CH = Battery flag
CL = Remaining battery life-percentage of charge
= AC line status
00h Off-line
01h On-line
02h On backup power
FFh Unknown
All other values are reserved.
= Battery status
00h High
01h Low
02h Critical
03h Charging
FFh Unknown
All other values are reserved.
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.
0 to 100 : Percentage of the battery charging, 100 represents full
FFh
: Unknown
All other values are reserved.
296
charge in battery.