_Add_Global_V86_Data_Area

include vmm.inc

VMMcall _Add_Global_V86_Data_Area, <LinAddr, nBytes, flags>

or eax, eax ; nonzero if added, zero if error

jz not_added


The _Add_Global_V86_Data_Area service adds a region to the list of regions available for allocation as global V86 data areas.

This service is only available during initialization, and only for Windows version 3.1 or later.

Parameters

LinAddr

Specifies the linear address of the first byte of the region. This address must be less than 100000h, and must not lie between the first and last V86 page for the specified virtual machine.

nBytes

Specifies the size in bytes of the region.

flags

Specifies the operation flags. This parameter must be set to 0.

Return Value

The EAX register contains a nonzero value if the service is successful. Otherwise, EAX contains zero to indicate an error, such as an invalid region specification.

Comments

This service supports virtual devices, such as the virtual MS-DOS manager and the V86MMGR device, which can manage high memory above the last V86 page. The service lets these devices add available regions which would otherwise go unused. Typically, such regions are nonpage-aligned fragments which cannot be used for normal operations requiring page-aligned memory.

Calls to this service should be made during processing of the Sys_Critical_Init message. Virtual devices should not wait for the Device_Init or Init_Complete messages because most of the allocation of global V86 data areas is done while processing the Device_Init message.

If this service adds a region that is above the last V86 page, virtual devices should not attempt to allocate the region until the Sys_Critical_Init message has been processed.

Uses

EAX

See Also

_Allocate_Global_V86_Data_Area