Plug and Play BIOS Specification

Plug and Play BIOS Specification 1.0A Page 38
Example:
The following example illustrates how the 'C' style call interface could be made from an assembly
language module:
.
.
.
push Bios Selector
push segment/selector of Message ; pointer to Message
push offset of Message
push GET_EVENT ; Function 3
call FAR PTR entryPoint
add sp,8 ; Clean up stack
cmp ax,SUCCESS ; Function completed successfully?
jne error ; No-handle error condition
.
.
.
4.6.2 Function 4 - Send Message
Synopsis:
int FAR (*entryPoint)(Function, Message, BiosSelector);
int Function; /* PnP BIOS Function 4 */
unsigned int Message; /* Docking Message */
unsigned int BiosSelector; /* PnP BIOS readable/writable selector */
Description:
Required for Dynamic Event Management. This function will provide system software with a mechanism
for interacting with the system while handling system events. There are three classes of messages that are
supported by this interface: Response Messages, Control Messages, and OEM Defined Messages. The
Response Messages are used as a means whereby the system BIOS will not proceed with a particular event
until the system software provides a response instructing the system BIOS to continue or abort the
processing of that event. Message values 0 through 3Fh are reserved for Response Messages. Control
Messages provide system software with the ability to cause a particular event to happen. Message values
40h through 7Fh are reserved for Control Messages. OEM Defined Messages are specific to the OEM's
system implementations and are only understood by the OEM. Message values 8000h through FFFFh
identify OEM Defined Messages. The following table describes the event messages that system software
can send to the system BIOS, where Message has one of the following meanings: