This function returns status in AX ([BATTFL2] [BATTFL1]) relating to various aspects of System Power. A double word value is also returned in the register pair [CX DX] that indicates the length of time that the batteries have been charging. A brief description of the bits returned in AL follows.
The {MAIN, BKUP, CARD} bits are set by the operating system when system voltages are measured and determined to be below the Low Battery thresholds. Since batteries have a tendency to recover after a bit of non-use, the measured voltage will have to exceed the Low Bat Threshold by a certain delta to reset these bits. These bits when set will cause Low Batt Warning messages until acknowledged by a press of the [ESC] key.
The UCHG bit reflects the Enable/Disable choice made by the user in SETUP. It is set or cleared by Int 15h, Fcn 6004h. It may also be reset by the operating system in the event that the hardware detects overcharge. In this case, charging will be disabled immediately, and the user will generally have to use the SETUP application to re-enable charging.
The {ECHG, FCHG} bits reflect the actual hardware charging status. If ECHG is set, the batteries are being charged. If FCHG is also set, the batteries are being charged at a faster rate.
The NOAC status bit shows whether the unit is currently using batteries or the adaptor for its power source. The operating system sets this bit depending on whether or not the adaptor is plugged in. If the adaptor is plugged in, the main batteries are not in use, regardless of the charging status.
The TYPE status bit indicates which battery type the user has said is installed (See Int 15h, Fcn 6003h). The operating system cannot verify that this bit is set correctly. This value governs Low Battery Thresholds, charging, and certain displays in the SETUP application.