include vmm.inc
VMMCall _ModifyPageBits, <VM, VMLinPgNum, nPages, bitAND, bitOR, pType, flags>
or eax, eax ; nonzero if modified, zero if error
jz not_modified
Modifies the page attribute bits for pages in the V86 address space of a virtual machine. Virtual devices use this service to modify page permissions, or to mark a hooked page as not present. Uses EAX, ECX, EDX, and Flags.
This service always clears the P_DIRTY and P_ACC bits regardless of the AND and OR mask values.
This service can be used to mark a range of pages as not present (clear the P_PRES bit). In this case, fault handlers must have been previously installed for the specified pages using the Hook_V86_Page service, and the pType parameter must be PG_HOOKED.
This service cannot be used to set the P_PRES bit. Use the _MapIntoV86 or _PhysIntoV86 service to make pages present.
If using the P_WRITE bit to simulate ROM in a virtual machine, a virtual device should map the pages using the _PhysIntoV86 service and immediately call the _ModifyPageBits service to clear the P_WRITE bit.
Hook_V86_Page, _MapIntoV86, _PhysIntoV86