0 like 0 dislike
275 views
in Computer Science by (1.0m points)
What are control transfer instruction?

1 Answer

0 like 0 dislike
by (1.0m points)

3.5 Control Transfer Instructions

The 80386 provides both conditional and unconditional control transfer instructions to direct the flow of execution. Conditional control transfers depend on the results of operations that affect the flag register. Unconditional control transfers are always executed.

3.5.1 Unconditional Transfer Instructions

JMP, CALL, RET, INT and IRET instructions transfer control from one code segment location to another. These locations can be within the same code segment (near control transfers) or in different code segments (far control transfers). The variants of these instructions that transfer control to other segments are discussed in a later section of this chapter. If the model of memory organization used in a particular 80386 application does not make segments visible to applications programmers, intersegment control transfers will not be used.

3.5.1.1 Jump Instruction

JMP (Jump) unconditionally transfers control to the target location. JMP is a one-way transfer of execution; it does not save a return address on the stack.

The JMP instruction always performs the same basic function of transferring control from the current location to a new location. Its implementation varies depending on whether the address is specified directly within the instruction or indirectly through a register or memory.

A direct JMP instruction includes the destination address as part of the instruction. An indirect JMP instruction obtains the destination address indirectly through a register or a pointer variable.

Direct near JMP. A direct JMP uses a relative displacement value contained in the instruction. The displacement is signed and the size of the displacement may be a byte, word, or doubleword. The processor forms an effective address by adding this relative displacement to the address contained in EIP. When the additions have been performed, EIP refers to the next instruction to be executed.

Indirect near JMP. Indirect JMP instructions specify an absolute address in one of several ways:

  1.  The program can JMP to a location specified by a general register

      (any of EAX, EDX, ECX, EBX, EBP, ESI, or EDI). The processor moves

      this 32-bit value into EIP and resumes execution.

  2.  The processor can obtain the destination address from a memory

      operand specified in the instruction.

  3.  A register can modify the address of the memory pointer to select a

      destination address.

3.5.1.2 Call Instruction

CALL (Call Procedure) activates an out-of-line procedure, saving on the stack the address of the instruction following the CALL for later use by a RET (Return) instruction. CALL places the current value of EIP on the stack. The RET instruction in the called procedure uses this address to transfer control back to the calling program.

by
cialis supplier uk <a href=" https://tadalafilusi.com/# ">generic version of cialis</a>
by
ivermectin oral 0 8 <a href=" https://stromectolgf.com/# ">stromectol for sale</a>
by
https://stromectolgf.com/# buy ivermectin cream
by
<a href=https://stromectolgf.online/#>where to buy ivermectin pills</a> ivermectin oral

Related questions

0 like 0 dislike
1 answer 79 views
asked Apr 5, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 133 views
asked Apr 3, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 64 views
asked Apr 3, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 450 views
asked Apr 5, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 76 views
asked Apr 3, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 82 views
asked Apr 4, 2019 in Computer Science by danish (1.0m points)
0 like 0 dislike
1 answer 60 views
0 like 0 dislike
1 answer 73 views
asked Dec 20, 2018 in Science by danish (1.0m points)
0 like 0 dislike
1 answer 133 views
asked Nov 21, 2018 in Physics by danish (1.0m points)
0 like 0 dislike
1 answer 1.9k views
Welcome to Free Homework Help, where you can ask questions and receive answers from other members of the community. Anybody can ask a question. Anybody can answer. The best answers are voted up and rise to the top. Join them; it only takes a minute: School, College, University, Academy Free Homework Help

19.4k questions

18.3k answers

8.7k comments

6.3k users

Free Hit Counters
...