US5490256A
Expired / Lapsed
US
⏱️ 0.0 years remaining
Method and mechanism for calling 32-bit functions from 16-bit functions
Assignee: International Business Machines Corp
•
Filing: 1994-09-06
•
Granted: 1996-02-06
•
Expires: 2014-09-06
Abstract
Abstract In the field of mixed 16-bit and 32-bit code, a method and mechanism are provided to implement alterations in the dynamic portion of memory containing the data objects used by code in the 16-bit environment so that such data is accessible to code from the 32-bit environment. The code necessary to implement the method is generated automatically by an enhanced compiler on identifying 16-bit linkage in the 32-bit code. Once the data objects in the stack are accesible to the 32-bit code, a function in the 16-bit code can successfully call a function in 32-bit code.
Inventors
- 👤 David M. Mooney
- 👤 Kevin A. Stoodley
Bibliographic Details
Application Number
—
Jurisdiction
US
Data Source
google_patents
Last Synchronized
2026-11-06 11:26
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/46; G06F9/54; G06F9/541; G06F8/00; G06F8/30; G06F8/40; G06F8/52; G06F8/70; G06F8/76
Claims Analysis
Total Claims: 30
Claim 1
Independent Claim
131 words
A combination operable in conjunction with a digital computer system having a central processing unit (CPU) to provide a 32-bit function with access to a memory stack shared with at least one 16-bit code function, the combination comprising: a 32-bit program means for causing the CPU to execute a 32-bit code function; and prologue means in the 32-bit program means responsive to a call from a 16-bit code function for: building a parameter list in a memory stack in 32-bit form to allow the 32-bit code function to access data in the memory stack; translating 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing the operating mode of the CPU to 32-bit form; establishing additional 32-bit registers; and executing the 32-bit code.
Claim 2
Dependent Claim
131 words
A combination operable in conjunction with a digital computer system having a central processing unit (CPU) to provide a 32-bit function with access to a memory stack shared with at least one 16-bit code function, the combination comprising: a 32-bit program means for causing the CPU to execute a 32-bit code function; and prologue means in the 32-bit program means responsive to a call from a 16-bit code function for: building a parameter list in a memory stack in 32-bit form to allow the 32-bit code function to access data in the memory stack; translating 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing the operating mode of the CPU to 32-bit form; establishing additional 32-bit registers; and executing the 32-bit code.
Claim 3
Dependent Claim
31 words
The combination of claim 1, the prologue means further comprising means for preserving segment register values and base register values used by the 16-bit code in an area of memory stack.
Claim 4
Dependent Claim
59 words
The combination of claim 2, further comprising epilogue means for: retrieving the values of the segment registers and the base register from the area of the memory stack and restoring values of the segment registers to 16-bit code values; and changing the operating mode of the CPU to 16-bit code format and returning control to the 16-bit code function.
Claim 5
Dependent Claim
26 words
The combination of claim 3, wherein the epilogue means further includes means for converting a return value from the 32-bit code to a 16-bit code form.
Claim 6
Dependent Claim
53 words
The combination of claim 1, wherein the stack includes a stack pointer, the prologue means further for aligning the stack pointer to a 4 -byte boundary at the beginning of the stack by converting an address in the stack pointer to an even multiple of 4 bytes prior to building the parameter list.
Claim 7
Dependent Claim
146 words
In a computing environment, having a central processing unit (CPU) and including mapping means for mapping addresses between 16- and 32-bit code, a method for calling 32-bit code from a 16-bit code in a program, in which at least one 16-bit stack frame in a memory stack, is allocated to the 16-bit code, the method comprising the computer implemented steps of: executing a program in the computing environment; during execution of the program, executing function embodied in 16-bit code; calling a function embodied in 32-bit code; building a parameter list in the memory stack in 32-bit form to allow the 32 bit code access data in the stack frame; translating 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing operating mode of the CPU to 32-bit form; establishing all additional 32-bit registers; and, executing the 32-bit code.
Claim 8
Dependent Claim
146 words
In a computing environment, having a central processing unit (CPU) and including mapping means for mapping addresses between 16- and 32-bit code, a method for calling 32-bit code from a 16-bit code in a program, in which at least one 16-bit stack frame in a memory stack, is allocated to the 16-bit code, the method comprising the computer implemented steps of: executing a program in the computing environment; during execution of the program, executing function embodied in 16-bit code; calling a function embodied in 32-bit code; building a parameter list in the memory stack in 32-bit form to allow the 32 bit code access data in the stack frame; translating 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing operating mode of the CPU to 32-bit form; establishing all additional 32-bit registers; and, executing the 32-bit code.
Claim 9
Dependent Claim
44 words
A method, according to claim 6, further comprising the step of creating and maintaining a record of the original register values for said at least one 16-bit stack frame before performing the steps of building the parameter list and translating said 16-bit register values.
Claim 10
Dependent Claim
34 words
A method, according to claim 7, further comprising the step of reserving parameter values for 16-bit code in said at least one stack frame separately in the memory stack before building the parameter list.
Claim 11
Dependent Claim
38 words
A method, according to claim 6, wherein the operating mode of the CPU is changed to 32-bit code by executing a jump to a 48-bit address for 32-bit code, and subsequently executing a far return from said address.
Claim 12
Dependent Claim
26 words
A method, according to claim 9, further comprising the step of implementing a mapping of addresses from 16-bit to 32-bit format after changing the operating mode.
Claim 13
Dependent Claim
30 words
A method, according to claim 6, wherein the operating mode of the CPU is changed to 32-bite code by pushing onto the memory stack a 48-bit address for 32-bit code.
Claim 14
Dependent Claim
26 words
A method, according to claim 11 further comprising the step of implementing a mapping of addresses from 16-bit to 32-bit format after changing the operating mode.
Claim 15
Dependent Claim
64 words
A method, according to claim 6, further comprising the following steps implemented on completion of a function in 32-bit code in order to implement a transfer of control to 16-bit code: converting a return value in the function in 32-bit code to 16-bit format; converting the translated register values back to 16-bit format; and changing the operating mode of the CPU to 16-bit code.
Claim 16
Dependent Claim
25 words
A method, according to claim 13, wherein the step of converting the translated register values back to 16-bit format include establishing a 16-bit register environment.
Claim 17
Dependent Claim
29 words
A method, according to claim 6, wherein the step of translating the 16-bit register values to 32-bit format includes establishing a 32-bit segment register environment with the translated values.
Claim 18
Dependent Claim
26 words
A method, according to claim 6, further comprising the step of implementing a mapping of addresses from 16-bit to 32-bit format after changing the operating mode.
Claim 19
Dependent Claim
113 words
In a computing environment including means for mapping addresses between 16- and 32-bit code, a mechanism for enabling calls from a program in 16-bit code to a subroutine in 32-bit code, comprising: a memory stack in which at least one stack frame is allocated to the program in 16-bit code; a 32-bit compiler having a enhancement element for generating and imbedding in a 32-bit subroutine, first code to transfer control in a 16-bit environment to 32-bit code and second code for returning control to 16-bit code; and signal means for activating the enhancement element in the 32-bit compiler to generate the first code to transfer control and the second code to return control.
Claim 20
Dependent Claim
113 words
In a computing environment including means for mapping addresses between 16- and 32-bit code, a mechanism for enabling calls from a program in 16-bit code to a subroutine in 32-bit code, comprising: a memory stack in which at least one stack frame is allocated to the program in 16-bit code; a 32-bit compiler having a enhancement element for generating and imbedding in a 32-bit subroutine, first code to transfer control in a 16-bit environment to 32-bit code and second code for returning control to 16-bit code; and signal means for activating the enhancement element in the 32-bit compiler to generate the first code to transfer control and the second code to return control.
Claim 21
Dependent Claim
22 words
A mechanism, according to claim 17, further comprising means for implementing a 32-bit operating mode in said at least one stack frame.
Claim 22
Dependent Claim
28 words
A mechanism, according to claim 18, wherein the means for implementing a 32-bit operating mode comprises means for executing a jump to a 48-bit address for 32-bit code.
Claim 23
Dependent Claim
29 words
A mechanism, according to claim 18, wherein the means for implementing a 32-bit operating mode comprises means for pushing a 48-bit address for 32-bit code onto the memory stack.
Claim 24
Dependent Claim
23 words
A mechanism, according to claim 17, wherein the signal means comprise a 16-bit linkage in the 32-bit subroutine called by the 16-bit program.
Claim 25
Dependent Claim
22 words
A mechanism, according to claim 17, wherein the signal means comprise a 16-bit linkage in source code processed in the 32-bit compiler.
Claim 26
Dependent Claim
164 words
A combination operable in conjunction with a digital computer system having a central processing unit (CPU) for calling 32-bit code from a 16-bit code in a program executing on the digital computer system, said combination comprising a data storage medium operable in conjunction with a data storage system of the digital computer system, the data storage medium having resident thereon program means executable on the CPU for performing steps including: during execution of a program in the digital computer system while the CPU is in a 16-bit operating mode, executing a function embodied in 16-bit code; calling a function embodied in 32-bit code; building a parameter list in a memory stack in 32-bit form to allow the 32bit code to access in the stack frame; translating the 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing the operating mode of the CPU to 32-bit form; establishing all additional 32-bit registers; and executing the 32-bit code.
Claim 27
Dependent Claim
164 words
A combination operable in conjunction with a digital computer system having a central processing unit (CPU) for calling 32-bit code from a 16-bit code in a program executing on the digital computer system, said combination comprising a data storage medium operable in conjunction with a data storage system of the digital computer system, the data storage medium having resident thereon program means executable on the CPU for performing steps including: during execution of a program in the digital computer system while the CPU is in a 16-bit operating mode, executing a function embodied in 16-bit code; calling a function embodied in 32-bit code; building a parameter list in a memory stack in 32-bit form to allow the 32bit code to access in the stack frame; translating the 16-bit register values in the memory stack into a form which is addressable by the 32-bit code; changing the operating mode of the CPU to 32-bit form; establishing all additional 32-bit registers; and executing the 32-bit code.
Claim 28
Dependent Claim
34 words
The combination of claim 23, wherein the step of building a parameter list includes preserving segment register values and base register values used by the 16-bit code in an area of the memory stack.
Claim 29
Dependent Claim
74 words
The combination of claim 24, wherein the steps further include: converting a return value from the 32-bit code to a 16-bit code form; retreiving the values of the segment registers and the base register from the area of the stack and restoring values of the segment registers and the base register to 16-bit code values; and changing the operating mode of the CPU to 16-bit code format and returning control to the 16-bit code.
Claim 30
Dependent Claim
38 words
The combination of claim 23, wherein the stack includes a stack pointer, the steps further including, prior to building the parameter list, aligning the stack pointer to a four-byte memory address boundary at the beginning of the stack.
References Cited (Backward Citations)
US4297743A
Cited
US4445173A
Cited
US4569018A
Cited
US4928237A
Cited
US5127103A
Cited
US5097533A
Cited
US5146593A
Cited
US5144551A
Cited
US5129070A
Cited
USPTO Annuity & Maintenance Windows
| Annuity Stage | Window Opens | Payment Deadline | Surcharge Period Until | Estimated Fee | Status |
|---|---|---|---|---|---|
| 3.5 Years (Year 4) | 1999-02-05 | 1999-08-07 | 2000-02-06 | $2000.00 | Window Closed / Lapsed |
| 7.5 Years (Year 8) | 2003-02-05 | 2003-08-07 | 2004-02-06 | $3760.00 | Window Closed / Lapsed |
| 11.5 Years (Year 12) | 2007-02-05 | 2007-08-07 | 2008-02-06 | $7700.00 | Window Closed / Lapsed |