Electrical computers and digital processing systems: support – Digital data processing system initialization or configuration
Reexamination Certificate
1994-04-22
2001-10-02
Courtenay, III, St. John (Department: 2151)
Electrical computers and digital processing systems: support
Digital data processing system initialization or configuration
C709S241000
Reexamination Certificate
active
06298440
ABSTRACT:
FIELD OF THE INVENTION
The present invention relates generally to a method for accessing functions in a computer system, and more specifically, to a method for accessing functions in a multiple entry point code resource.
BACKGROUND OF THE INVENTION
Code resources consist of functions that are invoked by a calling computer program (“calling program”). These functions are referred to as the component functions of the code resource. Code resources are linked with the calling program at runtime, but the calling program is not directly linked to the component functions.
In order for a calling program to use a code resource, the calling program uses the following procedure. First, the calling program loads the code resource into the allocated memory space of the calling program. Second, the calling program accesses and uses whichever component functions are desired. Finally, when the code resource is no longer needed, the code resource is purged from the allocated memory space of the calling program.
Typically, code resources contain one entry point to a dispatcher through which a calling program can access the component functions. The dispatcher is a function within the code resource. Therefore, a calling program cannot typically directly access the component functions of the code resource. Instead, when a calling program wants to execute a component function, the calling program invokes the dispatcher, passing an identifier of the requested component function as well as the parameters for the requested component function. The dispatcher determines the address of the component function and then invokes the component function, passing the parameters. Accessing component functions in this way (“indirectly”) increases processing time, thereby degrading system performance.
FIG. 1
depicts a conventional code resource. The code resource consists of a main code resource
101
and auxiliary code resources
105
,
106
. The auxiliary code resources
105
,
106
are code resources referred to by the main code resource
101
. The main code resource contains a dispatcher
102
, global variables
103
, component functions
107
,
108
and a jump table
104
. The dispatcher
102
acts as the single entry point into the main code resource
101
. The global variables
103
are variables that can be accessed by functions in either the main code resource
101
or the auxiliary code resources
105
,
106
. The jump table
104
contains entries that point to each component function contained in the auxiliary code resources
105
,
106
. A code resource that consists only of a main code resource is referred to as a single-segment code resource and a code resource with a main code resource and at least one auxiliary code resource is referred to as a multiple-segment code resource.
Using a prior “indirect access” method, a calling program
100
first loads the main code resource
101
into memory and performs a code resource initialization function. Next, the initialization function saves the base address of the main code resource
101
so that the component functions can access the global variables
103
, which are at a fixed offset within the main code resource
101
. The calling program
100
then calls the component functions of the code resource indirectly through the dispatcher
102
.
To call a component function, the calling program
100
invokes the dispatcher
102
passing an identifier of the requested component function and the parameters for the requested component function. The dispatcher
102
, in turn, invokes the requested component function passing the parameters. If the requested component function is contained within the main code resource
101
, then the dispatcher
102
can simply invoke the component function passing the parameters. However, if the requested component function is contained in an auxiliary code resource
105
,
106
, then the dispatcher
102
loads the auxiliary code resource
105
,
106
into memory (if not already loaded) and then calls the requested component function passing the parameters. An additional parameter passed to the component functions in an auxiliary code resource is the base address of the main code resource
101
. The base address parameter allows the component functions of the auxiliary code resource to access the global variables
103
in the main code resource
101
.
Another prior system provides direct access to component functions. The direct access prior system differs from typical prior systems in the way that the initialization function works and the way that the dispatcher works. In the direct access prior system, the initialization function of the calling program loads the main code resource into memory, determines the base address of the loaded main code resource, searches for a sequence of instructions and stores the base address at the location of the second and third instructions. Storing the base address in this way allows component functions in the main code resource to use global variables by executing the sequence of instructions to obtain the base address of the main code resource. The dispatcher of the direct access prior system can be requested to return the address of a component function. Thus, a calling program can use component functions directly. However, in using the direct access prior system, component functions which use global variables must reside within the main code resource because the main code resource is where the global variables are stored and the component functions in auxiliary code resources do not have access to the main code resource. Therefore, when using the direct access prior system, component functions in auxiliary code resources cannot use global variables.
SUMMARY OF THE INVENTION
In accordance with a first aspect of the present invention, a method is provided for initializing an auxiliary code resource. In accordance with the method of the first aspect of the present invention, the computer system has a multiple entry point code resource consisting of a main code resource, which contains global variables, and a plurality of auxiliary code resources. The method of the first aspect of the present invention provides for loading the auxiliary code resource into memory, searching the auxiliary resource for a sequence of markers in which the markers are specific instructions, and, upon locating the markers, storing a reference to the global variables into the sequence of markers.
In accordance with a second aspect of the present invention, a method is provided for implementing functions in a multiple entry point code resource having a main code resource. In accordance with the method of the second aspect of the present invention, a computer system contains a multiple entry point code resource, a resource pointer, and a get base address component. The method of the second aspect of the present invention provides for invoking the get base address component to obtain a base address of the main code resource and adjusting the resource pointer to ensure that the resource pointer contains an appropriate value.
REFERENCES:
patent: 5375241 (1994-12-01), Walsh
Thelen, Randy, “Under The Hood: The Power Mac's Run—Time Architecture:” Byte, Apr. 1994, p. 131 vol. 19 No. 4.*
DiLascia, Paul, Questions and answers: C/C++ (Programming Languages) Microsoft Systems Journal, Jul. 1993, V8, N7, p 83(5).*
Lefor, John, A.; Lund, Karen “Reaching into Expanded Memory (Software Design to Access Expanded Memory)”, PC Tech Journal, V5, N5, p100(15) May 1987.*
Eric Shapiro and Tom Thompson, “The Mac Extended: The Mac Operating System's Modular Design Lets Savvy Programmers Add New Features”, Byte, Jul. 1993, p. 205.*
Petzold, C., “Programming Windows,” Microsoft Press, Redmond, Washington, 1990, pp. 877-915.
Courtenay III St. John
Kilpatrick & Stockton LLP
Microsoft Corporation
LandOfFree
Method and system for providing multiple entry point code... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Method and system for providing multiple entry point code..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and system for providing multiple entry point code... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2585408