hthomas@oracle.nl (Huw Lyan Thomas) (01/26/91)
Does anyone know if there is a general method used to tell laptop software that the battery is about to die? I disassembled a TSR utility supplied with my Zeos notebook, which makes the machine beep shortly before the battery finally gives up, so you get a chance to save your work. This utility hooks onto the NMI (non-maskable interrupt). Is the NMI used in this way on other laptops too? If not, how do they do it? The reason I need to know is I am writing a disk cache, and want to flush it to disk before the power disappears. Thanks for any information, Huw Thomas
andrew@frip.WV.TEK.COM (Andrew Klossner) (02/01/91)
	"Does anyone know if there is a general method used to tell
	laptop software that the battery is about to die?"
No, there is no general method.
	"I am writing a disk cache, and want to flush it to disk before
	the power disappears."
"The whole world" of MSDOS applications *knows* that any disk cache is
a write-through cache.  A copyback cache would be dangerous indeed.
  -=- Andrew Klossner   (uunet!tektronix!frip.WV.TEK!andrew)    [UUCP]
                        (andrew%frip.wv.tek.com@relay.cs.net)   [ARPA]