- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference between CALL and JUMP instructions
A CALL instruction is used to call a subroutine, while a JUMP instruction updates the program counter value and makes it point to another location inside the program. Read this article to learn more about CALL and JUMP instructions and how they are different from each other.
What is a CALL Instruction?
A CALL instruction is utilized to call a sub-routine. Using a CALL instruction, the program control is transferred to a location in memory that is not a part of the main program.
A CALL instruction necessarily requires the initialization of a Stack Pointer (SP). It is basically a control transfer type instruction because it is used to invoke the subroutine.
Once all the CALL instructions called the subroutine and the execution of these subroutine is completed, then the program control is transferred back to the caller by using the RET instruction.
If we talk about machine cycles for the CALL instruction, then it requires 5 machine cycles.
What is a JUMP Instruction?
A JUMP (JMP) instruction is one in which the program control is transferred to a location in memory that is a part of the main program. It is utilized to cause the programmable logic control or PLC to skip over logics.
JUMP instruction uses the immediate addressing mode. Another important point about the JUMP instruction is that it does not require any return instruction after the execution of the JUMP instruction. Also, there is no need of initialization of a stack pointer.
Since the JUMP instruction is a transfer type instruction, we can transfer the information from one memory location to another using this instruction. The JUMP instruction requires only 3 machine cycles, which is less than that for the CALL instruction.
Difference between CALL Instruction and JUMP Instruction
The following table highlights all the important differences between CALL and JUMP instructions −
S.No. |
JUMP Instruction |
CALL instruction |
---|---|---|
1. |
By using JUMP, the program control transfers to a location which is also a part of the main program |
By using CALL instruction, the program control transfers to a location which is not a part of main program. |
2. |
Here the addressing mode is Immediate |
Here the addressing mode is Immediate and Register Indirect. |
3. |
We do not need to initialize the Stack Pointer (SP) to perform the JUMP instruction. |
We have to initialize the Stack Pointer (SP) before using some CALL instruction. |
4. |
The program counter value is not Pushed into Stack |
The value of program counter is pushed into stack before going to the pointed location. |
5. |
No return instruction is needed after JUMP instruction. |
After CALL, it enters into a subroutine, to come back from subroutine we need return instruction. |
6. |
The value of stack pointer remain unchanged |
The value of Stack Pointer is decremented by 2. |
7. |
10 T-States are required to perform JUMP instruction |
18 T-States are required to perform CALL instruction. |
8. |
3 Machine cycles are needed for JUMP |
5 Machine cycles are needed for CALL. |
Conclusion
The most significant difference that you should note here is that in a CALL instruction, the program control transfers to a location which is not a part of the main program; while in a JUMP instruction, the program control transfers to a location which is also a part of the main program.
- Related Articles
- Difference between call and jump instructions in 8085 Microprocessor
- Conditional and Unconditional JUMP instructions in 8085 Microprocessor
- Conditional JUMP instructions in 8085 Microprocessor
- Unconditional call and return instructions in 8085 Microprocessor
- Difference between 2-address and 1-address Instructions
- Difference between 3-address and 0-address Instructions
- Difference between 3-address and 1-address Instructions
- Difference between 3-address and 2-address Instructions
- Conditional call instructions in 8085 Microprocessor
- Difference between Call by Value and Call by Reference
- Difference Between BDC and Call Transaction
- What is the difference between call and apply in JavaScript?
- Differentiate between call option and put option
- Differentiate between long put and short call
- Jump Search
