◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── include vmm.inc VMMcall _Allocate_Device_CB_Area, <nBytes, flags> or eax, eax ; zero if error jz not_allocated mov [Offset], eax ; offset from start of control block to new area The _Allocate_Device_CB_Area service allocates an area in the control block of the current virtual machine for exclusive use by the virtual device. Virtual devices typically uses this service to allocate space to store data that is specific to a given virtual machine. This service is only available during initialization. Parameter Description ──────────────────────────────────────────────────────────────────────────── nBytes Specifies the number of bytes to allocate. flags Specifies the operation flags. This parameter must be set to 0. Return Value The EAX register contains the offset from the start of the control block to the new area if the service is successful. Otherwise, EAX contains zero to indicate an error such as insufficient memory to satisfy the request. Comments If this service returns an error, the virtual device should consider this a fatal error and respond accordingly. Although this service aligns the new area on a doubleword boundary and rounds the nBytes parameter up to the next multiple of 4, the virtual device must not rely on this behavior. The service fills the newly allocated area with zeros. When the system creates a new virtual machine, it fills all bytes of the control block with zeros. Uses EAX See Also Control_Block ♦