Device_Init

include vmm.inc

mov ebx, SysVM ; system VM handle

mov esi, OFFSET32 CommandTail ; points to WIN386 command tail

mov eax, Device_Init

VMMcall System_Control


The Device_Init message directs the virtual device to initialize itself. The virtual device typically allocates memory for a device-specific section in the control block, allocates other memory areas, hooks interrupts and I/O ports, and specifies instance data.

Parameters

SysVM

Specifies a handle identifying the system virtual machine.

CommandTail

Points to the command tail retrieved from the program segment prefix (PSP) of WIN386.EXE. The first byte in the command tail specifies the length in bytes of the tail.

Return Value

The carry flag is clear if the virtual device is initialized successfully. Otherwise, the carry flag is set to indicate an error and prevent the system from loading the virtual device.

Comments

The virtual device should allocate a device-specific section in the control block of the system virtual machine and then initialize the section.

The virtual device can call the Simulate_Int and Exec_Int services in the system virtual machine.

Uses

Flags

See Also

Init_Complete, Sys_Critical_Init