Geoff Chappell - Software Analyst
This function writes to the shadow memory of the x86 BIOS emulator.
NTSTATUS x86BiosWriteMemory ( USHORT Segment, USHORT Offset, PVOID Buffer, ULONG Size);
The Segment and Offset arguments provide a real-mode address to write to.
The Buffer and Size arguments provide the address and size (in bytes) of a buffer to read from.
The function returns zero (STATUS_SUCCESS) for success, else a status code.
It is an error (STATUS_INVALID_PARAMETER) if the function would write beyond 1MB, i.e., if adding the Size to the physical address represented by the Segment and Offset exceeds 0x00100000. Otherwise, the function writes the given number of bytes from the given buffer to the real-mode shadow memory, and succeeds. If a byte to be written is not shadowed, it is ignored. The write is confined to the given 64KB segment: on reaching the end of the segment, it wraps to the beginning.
The x86BiosWriteMemory function is exported by name from the HAL in version 6.0 and higher. It is undocumented.