THIS IS THE NEWS ITEM POSTED TO THE FreeDOS MAILING LIST:

* 17th - Feb. - 2001

Florian Xaver:

Added func  "int apmlib(int funktion)" for the C version!

* 22th - January - 2001
Florian Xaver:

Added DJGPP port of all functions!!

* 23th - August - 2000

I am delighted to announce that in the end, the APM library version 0.9 has been
finished. 

This package provides an interface to program the APM BIOS for PC, version
1.1 or later, to shut down and suspend your PC. It also provides routines
for rebooting and flushing the caches of your PC.

The library comes in the following flavours:
- C version for 16-bits
  (compatible with TurboC++ 1.0)
- Pascal version, for 16-bits and 32-bits
  (compatible with TurboPascal 7.0 and FreePascal)
In few days, it will be also tested for: TurboC 2.02, DJGPP C++ and TurboPascal5.5,
although I would be grateful for your feedback for these or other compilers.

The package is provided also with some very simple examples. Please, take them as
guide of how to build your own utilities, but I think they are too simple to be a
complete program.

The DOC\APMLIB.TXT contains the documentation about how to use it. I would like to
quote the following meaningful feature: caches are *NOT* automatically flushed before
reseting or turning off the machine, so it is responsibility of the programmer to try
and flush the caches, and solve the possible problems with it, before turning the PC
off or resetting it.

Finally, I wanted to mention that the release of this library wouldn't have been
possible without the help of Ralf Quint, who helped me with some troubles I was
having when linking the different modules, and that are now solved.

Here are the relevant parts of the interface specifications for this package:

=========== APMLib.h (excerpt) =======================================
WORD FlushAllCaches ( void );
/* Flushes the existing caches.
   RETURN:  0:    ok
                else: bipmap of caches that couldn't be flushed: (see docs) */

void Reboot (BOOL warm);
/* Reboots the system.
   INPUT:  Warm: indicates if a cold boot or warm boot will be performed
   NOTE:   Caches MUST be flushed before calling this procedure */


void ShutDown (void);
/* Turns the system off
   NOTES:  - Caches MUST be flushed before calling this procedure
             - This will only work under BIOSes supporting APM v.1.1 or later */


void CtrlAltDel (void);
/* Performs a Ctrl+Alt+Del
   NOTE:   - Caches MUST be flushed before calling this procedure */


void Suspend (void);
/* Suspends the system to a status of minimum power until a key is pressed
   NOTE:   - This will only work under BIOSes supporting APM v.1.1 or later */


BOOL APMIsInstalled (void);
/* Checks if APMIsInstalled
   RETURN:  TRUE if APM is installed*/


void APMGetVer (BYTE *Max, BYTE *Min);
/* Returns the version of the APM, if found
   NOTE:  APMIsInstalled MUST be called first, otherwise it won't return
            a correct version number*/

=========== APMLib.PAS (INTERFACE section) ===============================

Function  FlushAllCaches: word;
{ Flushes the existing caches.
  RETURN:  0:    ok
           else: bipmap of caches that couldn't be flushed: (see docs) }

Procedure Reboot (warm: boolean);
{ Reboots the system.
  INPUT:  Warm: indicates if a cold boot or warm boot will be performed
  NOTE:   Caches MUST be flushed before calling this procedure}

Procedure ShutDown;
{ Turns the system off
  NOTES:  - Caches MUST be flushed before calling this procedure
          - This will only work under BIOSes supporting APM v.1.1 or later}

Procedure CtrlAltDel;
{ Performs a Ctrl+Alt+Del
  NOTE:   - Caches MUST be flushed before calling this procedure}

Procedure Suspend;
{ Suspends the system to a status of minimum power until a key is pressed
  NOTE:   - This will only work under BIOSes supporting APM v.1.1 or later}

Function  APMIsInstalled: boolean;
{ Checks if APMIsInstalled
  RETURN:  TRUE if APM is installed}

Procedure APMGetVer (var Max,Min: byte);
{ Returns the version of the APM, if found
  NOTE:  APMIsInstalled MUST be called first, otherwise it won't return
         a correct version number}

=============================================================================
