This chapter describes the real-mode initialization procedure for static VxDs and defines the real-mode initialization services. For more information about real-mode initialization, see . For more information about real-mode registry services, see . Real-mode initialization does not apply to dynamically-loadable VxDs.
Real-Mode Initialization Procedure
The VMM calls the real-mode initialization procedure once only, and then discards the segment containing the procedure. It is not possible to have a real-mode procedure that permanently remains in the virtual machine.
The VMM requires the real-mode initialization procedure to start at offset 0 in the virtual device's real-mode initialization segment. Before calling this address, the VMM sets the CS, DS, and ES registers to the address of this segment. The VMM requires that the code or data for the procedure be defined within the real-mode segment, or in fixed memory (for example, in the ROM BIOS at segment address 40h). In general, the procedure should not attempt to access code or data outside the real-mode segment.
The procedure can use most ROM BIOS routines and MS-DOS system functions to examine memory and check the computer's configuration. It must not attempt to call any MS-DOS program termination function; this will hang the computer. Also, the procedure must close any files it opens before it returns to the VMM. The procedure must return to the VMM by executing a near ret instruction.
The real-mode procedure can modify all other registers except the SS:SP register pair.
Share with your friends: |