INT 15H 530bH: Get Power Management Event

 Expects: AX    530bH
          ──────────────────────────────────────────────────────────────────
 Returns: AH    APM error code (if CF=CY)
                (AH=80H means no events pending) else...
          BX    event code: 0001H System Stand-by Request Notification
                            0002H System Suspend Request Notification
                            0003H Normal Resume Request Notification
                            0004H Critical Resume Request Notification
                            0005H Battery Low Notification
          ──────────────────────────────────────────────────────────────────
    Info: You should poll this fn once or twice per second to see if the
          APM BIOS wants to tell you something.

          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 on return (when CF is clear), this contains the code indicating
          the event that APM wants you to know about and take action upon.
          It is one of:

    0001H APM wants to go into Stand-by state.  Upon receipt of this code,
          you should call INT 15H 5307H with BX=0001H and CX=0001H to put
          the system into stand-by state.

    0002H APM wants to go into Suspend state.  Upon receipt of this code,
          you should do any necessary cleanup and call INT 15H 5307H with
          BX=0001H and CX=0002H to put the system into suspend state.

    0003H APM had to go into suspend state without notifying you and it has
          now resumed operation.  You should recover from the unexpected
          suspend state as best you can.

    0004H APM had to go into suspend state without notifying you and it has
          now resumed operation, but the battery is critically low.  You
          should recover from the unexpected suspend state as best you can,
          but try to conserve power.

    0005H APM is telling you that the battery is running low.  You may want
          to minimize disk activity or take action to prepare for low-power
          operation.

   Notes: Notice that this is not a callback.  You must poll this fn every
          so often to see if any events are waiting.  But don't hog the CPU
          with these calls; once per second (or even less often) is
          probably fine.

See Also: APM API
          About APM
                                    -♦-