Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ikoo
Fri, 14 Aug 1998 00:00
Declaring Services
Author: ikoo
Date: Fri, 14 Aug 1998 00:00
Date: Fri, 14 Aug 1998 00:00
45 lines
3540 bytes
3540 bytes
DECLARING SERVICES : A virtual device uses the Begin_Service_Table and End_Service_Table macors to : declare its services. The macors mark the start and end of a list containing the names : of the services and optionally the names of the segments containing the services. The : declaration must be made in the same file as the virtual device declaration (that is, in : the file containing the Declare_Virtual_Device macro) and must be preceded with the : definition of a device-specific symbol. The following example shows service table : declaration for the sample virtual device, VSAMPLED: : Create_FSAMPLED_Service_Table equ 1 : Begin_Service_Table VSAMPLED : VSAMPLED_Service VSAMPLED_Get_Version, LOCAL : VSAMPLED_Service VSAMPLED_Service_1 : VSAMPLED_Service VSAMPLED_Servie_2,VxD_ICODE : End_Service_Table VSAMPLED : In this example, the Create_VSAMPLED_Service_Table symbol, defined just before the : service table declaration, directs the Begin_Service_Table macro to create a service : table for VSAMPLED. Once the declaration starts, the VSAMPLED_Service macro : actually declares the services. This required macro is created by the : Begin_Service_Table macro, and is only available within the servie table declaration. : The name of each service must exactly match the service's defined name, that is, the : name given with the BeginProc macro. : When declaring a service, the LOCAL option must be given after the service name if the : service is defined in the same source file containing the service table declaration. In : other words, the service table automatically declares a service as an external service : unless the LOCAL option is given. In the preious example, the : VSAMPLED_Get_Version serivce is define in the same file containing the service : table. : Similarly, a segment name must be given afters the service name if the service is not : defined in the VxD_CODE segment. In the previous example, the VSAMPLE_Service_2 : service is defined in the VxD_ICODE segment. : The order in which services are declared is important. The first declared service : for a virtual device must be the Get_Version service.( This service clears the carry flag and : returns with the virtual device's version number in the AX register.) Also, any new : services added to the virtual device must be declared at the end of the table(or in : explicitly reserved slots in the table). Since the VMM relies on the order of the servies : in the table to correctly link to the services, inserting a new service in the middle of the : table requires that all virtual devices using the virtual device's service be rebuilt. for : convenience, the service table declaration should be placed in an include file so that : other virtual devices can import the services by including the file rather than recreating the declaration. -- [m[1;36m�� ��Դ:���������� BBS bbs.nease.net��[FROM: 202.96.190.124][m
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads