LDRSRV_COPY_EXTENDED_MEMORY


mov   ax, 0006h             ; Copy_Extended_Memory
call  dword ptr [_ServiceEntry]  ; service entry point passed to
                                 ; real-mode initialization procedure

Allocates a block of extended memory in the specified data group (init, locked, or pageable) to the size requested and initializes the block with the given data.

AX

Must be 0006h.

CX

Number of bytes to allocate. Actual size is rounded up to the nearest DWORD.

DX

Type of data being allocated. Can be one of these values:

LDRSRV_COPY_INIT

INIT data

LDRSRV_COPY_LOCKED

LOCKED data

LDRSRV_COPY_PAGEABLE

PAGEABLE data


DS:SI

Address of data to be copied.

This service provides a way for VxDs to pass data to their protected-mode portions. The VxD creates a block of extended memory and passes its linear address through the VxD reference DWORD (that is, the value of EDX on exit from real-mode initialization). Multiple blocks allocated by a single VxD are guaranteed to be contiguous in linear address space, but not necessarily in physical address space. PAGEABLE data may actually be allocated as LOCKED data, at the loader's discretion. Initialization (INIT) data is always locked, and is discarded after all VxD initialization phases are completed.