精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>编程开发>>● 编程世界>>其他>>Virtual Device Segments

主题:Virtual Device Segments
发信人: ikoo()
整理人: simonshium(1999-06-30 20:19:26), 站内信件
VIRTUAL DEVICE SEGMENTS

Vitual Devices can have any combination of the following five segments:

Segment         Description
VxD_CODE        Specifies the protected-mode code segment. This required segment
                contains the device control procedure, callback procedures, services,
                and API procedures of the virtual device. Use the VxD_CODE_SEG
                and VxD_CODE_ENDS macros to define the start and end of
                definitions for this segment. This segment is also named_LTEXT.
VxD_DATA        Specifies the protected-mode data segment. This required segment
                contains the device descriptor block, service table, and any global
                data for the virtual device. Use the VxD_DATA_SEG and 
                VxD_DATA_ENDS macros to define the start and end of definitions
                for this segment. This segment is also named _LDATA.
VxD_ICODE       Specifies the protected-mode initialization code segment. This 
                optional egment usually contains the procedures and services that
                are used only during initialization of the virtual device. The VMM
                discards this segment after the Init_Complete message. Use the 
                VxD_ICODE_SEG and VxD_ICODE_ENDS macros to define the start
                and end of definitions for this segment. This segment is also
                named_ITEXT.
VxD_IDATA       Specifies the protected-mode initialization data segment. This optional
                segment usually contains the data used by the initialization
                procedures and services. The VMM discards this segment after the
                Init_Complete message. Use the VxD_IDATA_SEG and
                VxD_IDATA_ENDS macros to define the start and end of definitions
                for this segment. This segment is also named _IDATA.
VxD_REAL_INIT   Specifies the real-mode initialization segment. This optional segment
                contains the real-mode initialization procedure and data. The VMM
                calls this procedure before loading the rest of the virtual device, then
                discards this segment after the procedure returns. Use  the
                VxD_REAL_INIT_SEG and VxD_REAL_INIT_ENDS macors to
                define the start and end of definitions for the real-mode initialization
                segment. This segment is also named _RTEXT.

All code and data segments, except the real-mode initialization segment, are 32-bit
flat model, protected-mode segments. This means procedures and data defined in the
protected-mode segments have 32-bitoffsets. When the VMM loads the virtual devie,
it fixes all offsets according to the virtual device's actual position in memory. for this
reason, the OFFSET32 macro should be used in the protected-mode segments
wherever the OFFSET directive would ordinarily be used. The OFFSET32 macro
defines offsets for which the linker produces correct offset-fixup information.

Virtual devices cannot change the CS,DS,ES,SS segment registers. Virtual devices
can use the FS nad GS segment registers.

              

--
※ 来源:.广州网易 BBS bbs.nease.net.[FROM: 202.96.133.202]

[关闭][返回]