A tool for APM power management in FreeDOS.
Copyright Eric Auer 2003. Please do not spread - just send
me (NASM) CODE to complete the project! When done, you will
be credited and the project will be released under GPL 2.
Please read apmnotes.txt for an outline of the workings.

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).
APMBIOS ->  call connectAPM, then enableAPM. Configure POWER, IF
            already TSR, appropriately (using the int 2f API).
            Finally, call statusPOWER / statusAPM?
APMDOS ->   between the hookhandler call and the going TSR code,
            insert configuration through POWER API on int 2f.
            Finally, call statusPOWER / statusAPM?
            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.

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
SUSPEND ->  call shutDownHandler with AX=4
POWEROFF -> call shutDownHandler with AX=5

HOTBOOT ->  call shutDownHandler with AX=0
WARMBOOT -> call shutDownHandler with AX=1
COLDBOOT -> call shutDownHandler with AX=2

VGAON ->    enable EGA/VGA video
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).

UNLOAD ->   (optional) allow un-hooking - NOT YET IMPLEMENTED


... 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. Also has
             to update the idle / busy timer tick statistics...)
             2. working (modify counters based on caller IP, which
             is one of the ix?? points, with saturation, count up
             general busy-ness count which i08 counts down...)
             (in handlers.asm and hooktsr.asm)...
