Image Number 12 for United States Patent #4454579.
An improved system for performing call and return operations in a computer system in which every call and return operation changes the program counter and the frame pointer but some call and return operations change other state. Included in the state which may change in the computer system of the present invention is addresses used in calculating other addresses, an identifier specifying which instruction set the processor is executing, and protection state which determines what data may be accessed during execution of a procedure. In the system, the state saved and restored in the call and return operations is divided into basic state saved and restored on every call and return and extended state saved and restored on only some calls and returns. The frame associated with an execution accordingly contains either saved basic state or saved basic state and saved extended state. The frame further contains a frame type item in each frame which specifies whether it contains only basic state or both basic and extended state. There are two call instructions and a single return instruction. The system responds to one call instruction, the neighborhood call instruction, by saving and setting only basic state; it responds to the other, the general call instruction, by saving and setting both basic state and extended state, and if necessary, saving and setting protection state. The processor responds to the single return instruction and the frame type specifier by restoring the state specified in the frame type specifier.