### This file is part of FDAPM, a tool for APM power management and
### energy saving. (c) by Eric Auer <eric@coli.uni-sb.de> 2003-2004.

FDAPM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2 of the License,
or (at your option) any later version.

### FDAPM is distributed in the hope that it will be useful, but
### WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
### GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with FDAPM; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
(or try http://www.gnu.org/licenses/ at http://www.gnu.org).


This is the command line option list ...

>>> >>> >>> Run FDAPM with the HELP option to get a less   <<< <<< <<<
>>> >>> >>> technical and more human readable help screen! <<< <<< <<<

APMOFF ->   call connectAPM, then int 15.5306, then disableAPM.
            Also configure POWER, IF already TSR, to savingstrat 0
            (using the int 2f POWER API).
            MS POWER syntax compatibility alias: "OFF".
APMBIOS ->  call connectAPM, then enableAPM. Configure POWER, IF
            already TSR, appropriately (using the int 2f API).
            MS POWER syntax compatibility alias: "STD".
APMDOS ->   between the hookhandler call and the going TSR code,
            insert configuration through POWER API on int 2f.
            Should also configure savingstrat (whether to use HLT,
            whether to use APM CPU IDLE)...
            This should give you maximum energy savings. It is the
            only mode that causes FDAPM to stay resident in RAM.
            MS POWER syntax compatibility aliases: "ADV" and
            "ADV:MIN", "ADV:REG" and "ADV:MAX", with the special
            property that only "ADV:MAX" (and "APMDOS") enables
            the int 28 idling hook (MS never hooks int 28, and
            Novell performance degrades when FDAPM hooks int 28).

INFO ->     call statusDisplay (combining with other options
            might be allowed in the future)
STATS ->    (optional) get statistics through POWER API and show
            them (see APMStatBuf and IdleStatBuf data area!)...
HELP ->     shows an human readable help screen

STANDBY ->  call shutDownHandler with AX=3: Put the system in an
            energy-saving standby mode. Only possible with APM BIOS.
            Tells caches to flush before going to standby.
SUSPEND ->  call shutDownHandler with AX=4: Put the system in an
            energy-saving suspend mode after spinning down disks.
            Requires an APM BIOS to be present. Tells caches to
            flush before suspending.
POWEROFF -> call shutDownHandler with AX=5: Try to tell the computer
            to turn itself off. Only works if you have an APM BIOS
            and an ATX or newer power supply. FDAPM reverts to using
            SUSPEND instead if POWEROFF fails. Tells caches to flush
            before powering down and tells disks to spin down.

HOTBOOT ->  call shutDownHandler with AX=0: Just load the operating
            system again. Will fail very often because drivers will
            usually fail to shut down properly. Before attempting
            the reboot, FDAPM tells caches to flush (write back
            data to disk) themselves and waits for a moment.
WARMBOOT -> call shutDownHandler with AX=1: Reboot by running the
            BIOS bootstrap code again. Usually safe but can crash if
            you use incompatible protected mode software, like some
            versions of EMM386. Flushes caches before rebooting.
COLDBOOT -> call shutDownHandler with AX=2: Reboot (after flushing
            caches) by telling the 8042 keyboard controller to pulse
            the hardware reset circuits. Very similar to a real cold
            reboot - only in rare cases, pressing the reset button or
            power-cycling the computer will give you a "colder" reset.

VGAON ->    enable EGA/VGA video: just pressing a key after using the
            VGAOFF function will NOT enable video again, this is not
            a screen saver. It is only a way to turn video on and off
            without any kind of system monitoring or automatic wakeup.
VGAOFF ->   disable EGA/VGA video: this should stop the CRTC and stop
            basically all signals, especially refresh. Screens with
            DPMS support will react by entering stand by mode, while
            other screens will just lose sync (not very good for them,
            so do not stay in this mode for longer time in that case).

SPINDOWN -> Spin down IDE disks on the first 2 IDE controllers (first
            four disks) by using direct hardware access. Use at your
            own risk. The disks will spin up again when you use them
            again. The disks have builtin "intelligence" for that. To
            save energy automatically, you can often use a BIOS setup
            option which tells the disk at boot time that it can spin
            down itself (it has a builtin timer!) whenever it has not
            been accessed for a while. There are free DOS tools to
            select another timeout later (250 preconfigured delays).
SPINUP ->   While not being really useful, you can use this command to
            tell your disks to wake up again at once.

All harddisk sleep/standby/off related options automatically add a
delay to give the harddisk time to change state. All of those and all
reboot related options tell caches to write back dirty buffers to
disk before the real action begins.


MS POWER compatibility: You can use FDAPM and POWER to configure each
other, but FDAPM uses the 3 ADV:xxx levels in different way. I hear
that MS POWER hardly saves any energy in ADV:REG and ADV:MIN mode,
and I can tell you that FDAPM looks for even more signs of idleness
than POWER does when you use FDAPM ADV:MAX (APMDOS) mode. Older
FDAPM versions (before 11/2003) did not support the "percentage of
idle CPU time" feature. Newer versions calculate the percentage as
"time that FDAPM is in APMDOS mode versus part of that time where
FDAPM invokes HLT (putting the CPU in low power mode)".

More POWER compatibility: Running FDAPM without command line options
will trigger "INFO" and "STATS" if COMSPEC is set, but will load in
APMDOS mode if COMSPEC is not set (useful for INSTALL=FDAPM... lines
in config.sys). Introduced 27 Nov 2003. Older FDAPM versions just
display the help screen if no command line options are given.


... and this is the TODO LIST ...

handlers.asm some POWER API "set" functions are only dummies, you
             may want to change that.
             Hooked interrupts are roughly complete, the main work
             should be done in "working" and "idling".

UNIDLECHECK  if you want to define this (activate it at compile
             time), you must fill in: 1. i08: timer tick handler,
             count down and call idling if zero reached.
             2. working: count up general busy-ness count which
             i08 counts down - the rest is there since Nov 2003.
             (in handlers.asm and hooktsr.asm)...

UNLOAD       add a way to remove FDAPM from memory (no need to be
             compatible to MS POWER - you cannot remove that one).

APM BIOSes   Some APM BIOSes have bugs like spinning up the disks
             at the moment when they cut power or not being able
             to enter sleep / standby mode properly. Hints for
             workarounds are always welcome. Already known: If your
             software fails to DISconnect from the protected mode
             APM BIOS interface, weird things can happen when
             FDAPM connects the interface in real / v86 mode later.
