Virtual Devices (3.1) (vdag31qh.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Set_NMI_Handler_Addr
◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
include vmm.inc
mov esi, OFFSET32 nmi ; points to new NMI handler
VMMcall Set_NMI_Handler_Addr
The Set_NMI_Handler_Addr service sets the Non-Maskable Interrupt (NMI)
vector to the address of the specified NMI handler.
Parameter Description
────────────────────────────────────────────────────────────────────────────
nmi Points to the new NMI handler.
Return Value
This service has no return value.
Comments
To install an NMI handler, a virtual device must retrieve and save the
current NMI handler address using the Get_NMI_Handler_Addr service, and set
the new address using Set_NMI_Handler_Addr.
The NMI handler must not call VMM or virtual device services. This
restriction includes calls to asynchronous VMM services. The NMI handler can
examine and modify local data in the VxD_LOCKED_DATA_SEG segment, but it
must not attempt to access any other memory, including virtual machine and
V86 memory. If a virtual device needs to use VMM services in response to an
NMI, it should install an NMI event handler using the Hook_NMI_Event
service.
The NMI handler must not execute the iret instruction. Instead, it must jump
to the address of the previous NMI handler (retrieved using the
Get_NMI_Handler_Addr service). The CPU ignores additional NMIs until it
executes the iret instruction. Because no NMI handlers in the chain execute
this instruction, the handlers are guaranteed not to be re-entered.
Some computers require the latch at port 70h be reset to enable further
NMIs. To simplify NMI processing for other NMI handlers, the virtual parity
device (PARITY) automatically resets this latch.
Uses
Flags
See Also
Get_NMI_Handler_Addr, Hook_NMI_Event
♦