INT 15H 5307H: Set Power State

 Expects: AX    5307H
          BX    power device ID (0000H = entire system)
          CX    desired state: 0000H = Ready (not supported for BX=0001H)
                               0001H = Stand-by
                               0002H = Suspend
                               0003H = Off (not supported for BX=0001H)
                               else  = (reserved)
          ──────────────────────────────────────────────────────────────────
 Returns: AH    APM error code (if CF=CY)
          ──────────────────────────────────────────────────────────────────
    Info: This places a device or the system into a desired power-
          conservation state.

          You may access this service via INT 15H or by using the APM entry
          address obtained via INT 15H 5302H or INT 15H 5303H (protected
          mode connect).

       BX is a Power Device ID.  For instance, 0100H is the display.

       CX options are:

    0000H Ready - the system or device is fully powered and ready for
          action.  This does not differentiate between active and idle
          states.

          You cannot specify a device ID of 0001H (all devices) with this
          setting.

    0001H Stand-by - the system or device is in an intermediate state which
          attempts to conserve power while maintaining operational data and
          parameters.  The BIOS automatically enters this state when the
          CPU is idle and no device activity has occurred within a machine-
          defined period or time.  The system or device will remain in
          stand-by until a device raises an interrupt or any controlled
          device is accessed.

    0002H Suspend - the system or device is at its lowest level of
          operation which still maintains operational data and parameters.
          Computations are halted.  Resumption of activity will not occur
          until signaled by an external event such as a button press, timer
          alarm, etc.

    0003H Off - the system or device is powered-down and inactive.
          Operational data and parameters may or may not be preserved.

          You cannot specify a device ID of 0001H (all devices) with this
          setting.

   Notes: Two combinations of BX and CX have important meanings:

          ■ BX=0001H and CX=0001H
            specifies to put the entire system into stand-by mode.

          ■ BX=0001H and CX=0002H
            specifies to put the entire system into suspend mode.  In this
            case, the call does not return until an external event re-
            awakens the BIOS.

          These two options are normally used after a Notification Event
          (see INT 15H 530bH) tells you that the system is about to go into
          stand-by or suspend mode.  However, an application can initiate
          this if it detects some idle time.

See Also: APM API
                                    -♦-