Procedural Calls Flashcards
are considered the most important innovation in the development of programming languages.
Procedures
is a self-contained computer program that is incorporated into a large program
procedure
Procedures are also known as …
subroutines
Characteristics of a procedure
- It allows the same piece of code to be used multiple times.
- It improves efficient use of storage space in a system.
- It allows large programming tasks to be subdivided into smaller units.
- It greatly eases the programming tasks.
- A procedure call can appear in another procedure, which allows the nesting procedures to an arbitrary depth.
- All procedure call is matched by a return instruction in the called program.
In order to call a procedure from a variety of points, the processor must save the return address so that the return process can take place correctly. The return address can be stored in a …
register, start of the called procedure, or at the top of the stack
is a procedure that can be implemented in such a way that more than one process can execute it at the same time without any conflict
reentrant procedure
This branches from the present location to the procedure
Call instruction (CALL)
A … is an instruction to call a procedure that is in the same code segment as the CALL instruction that calls it.
Near CALL
is used to call a procedure from a different segment
Far CALL
This instruction pushes the current IP value onto the stack and causes a jump to the entry point of the procedure by placing the address of the entry point in the IP
Call Address
This instruction pushes the content of the IP onto the stack and jumps to the offset address in the current code segment
Call Label (Near)
This instruction pushes the content of the IP onto the stack and jumps offset address in any memory location
Call Label (Far)
This instruction pushes the content of the IP onto the stack and jumps to the offset address in the memory register of the current code segment
CALL Memory (Near)
This instruction pushes the content of the IP onto the stack and jumps to the offset address of the register at any memory location
CALL Memory (Far)
This returns the control to the place from which a procedure was called
Return instruction (RET)