int FAR (*entryPoint)(Function, Bufsize, ApmIdTable, BiosSelector);
int Function; /* PnP BIOS Function 0Bh */
unsigned int FAR *BufSize; /* Size of buffer to copy APM ID table to */
unsigned char FAR *ApmIdTable; /* Address of caller's buffer for*/
/*the table */
unsigned int BiosSelector; /* PnP BIOS readable/writable selector */
Description:
Required for Power Management. This function will copy the table of APM 1.1 (or greater) device identifier to Plug and Play device identifier mappings to the buffer specified by the caller. This allows the operating system to use the APM interface to perform power management on individual devices controlled by the system BIOS. If BufSize indicates that the buffer is not large enough to contain the entire table, the system BIOS will return BUFFER_TOO_SMALL and the size of the buffer required to contain the entire table will be returned in the caller's BufSize parameter. Therefore, the caller can call this function with BufSize equal to 0 to determine the size of the buffer it needs to allocate for the APM identifier table. The apmIDTable argument contains the pointer to the caller's memory buffer. If the buffer is large enough, on return apmIDTable will contain the APM identifier table. Each entry in the table will be specified in the following format:
Field | Length | Value |
Device identifier | DWORD | Varies |
APM 1.1 identifier (version 1.1 or greater) | WORD | Varies |
Device Identifier:
This field is the Plug and Play device identifier. The Logical Device ID provides a mechanism for uniquely identifying multiple logical devices embedded in a single physical board. The format of the logical device ID is composed of three character compressed ASCII EISA ID and a manufacturer specific device code.APM identifier:
This element specifies the corresponding APM device identifier. An APM identifier table with multiple entries would be described as follows:Field |
Device identifier #1 |
APM identifier #1 |
Device identifier #2 |
APM identifier #2 |
: |
: |
Device identifier #n |
APM identifier #n |
.
.
.
push Bios Selector
push segment/selector of APM Id table ; pointer to APM Id
; table buffer
push offset of APM Id table
push segment/selector of table buffer size ; pointer to APM Id
; table buffer size
push offset of APM Id table buffer size
push GET_APM_TABLE ; Function 0Bh
call FAR PTR entryPoint
add sp,12 ; Clean up stack
cmp ax,SUCCESS ; Function completed
; successfully?
jne error ; No-handle error
; condition
.
.
.