Ret-unconditional branch instruction-microprocessor, Assembly Language

RET : Return from the Procedure:-

At each CALL instruction, the register IP and register CS of the next instruction is pushed to stack, before the control is transferred to the process. In the ending of the procedure, the RET instruction ought to be executed. When it is executed, previously stored content of register IP and CS along with the flags is retrieved into the CS register, IP register and flag registers from the stack and the execution of the main program continues further. The procedure can be a far or a near procedure. In the case of a FAR procedure, the existing contents of SP points to IP and CS register at the time of return. While in the case of a NEAR procedure, it points to only IP. Depending on the type of procedure and the SP contents, the RET instruction has four types.

1. Return within the segment.

2. Return within the segment adding 16-bit immediate displacement to the SP contents.

3. Return the intersegment.

4. Return the intersegment adding 16-bit immediate displacement to the SP contents.

 

Posted Date: 10/12/2012 3:58:04 AM | Location : United States







Related Discussions:- Ret-unconditional branch instruction-microprocessor, Assignment Help, Ask Question on Ret-unconditional branch instruction-microprocessor, Get Answer, Expert's Help, Ret-unconditional branch instruction-microprocessor Discussions

Write discussion on Ret-unconditional branch instruction-microprocessor
Your posts are moderated
Related Questions
Hand shaking : Handshaking, or 2-way handshaking, is 1 type of strobe operation. It typically involves 2 handshaking lines: an output line to denote when the board is ready an

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

DMA controller :     Steps include in transferring a block of data from I/O devices (for example a disk) to memory: 1. CPU sends a signal to initiate disk transfe

CMPS : Compare String Byte or String Word:-The CMPS instruction may be utilized to compare two strings of Words or byte. The length of the string ought to be stored in the CX. If

Instruction Formats A machine language instruction format has 1 or more number of fields linked with it. The first field is known as operation code field or op code field, whic

Prime Finder - assembly program: Problem:  Prime Finder   In this problem you will write a small program that tests whether a given integer is a prime number or not.  Let's

Write the structure of For…Next loop in VB.Net and also write a program to print integers from 1 to 10 on the console.

64-bit integer calculator, which processes using 16-bits at a time (reg/mem16 operands)

 Pin Description of 8086 The microprocessor 8086 is a 16-bit CPU available in 3 clock rates, for example 5, 8 and 10 MHz, packaged in a40 pin CERDIP or plastic package. The 8

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of ax register