answersLogoWhite

0

The stack in the 8086/8088 microprocessor, like that in many microprocessors, is a region of memory that can store information for later retrieval. It is called a stack, because you "stack" things on it. The philosophy is that you retrieve (pop) things in the opposite order of storing (push) them. In the 8086/8088, the stack pointer is SS:SP, which is a 16 bit pointer into a 20 bit address space. It, at any point of time, points to the last item pushed on the stack. If the stack is empty, it points to the highest address of the stack plus one. In a push operation, the SP register is decremented by two, and the data to be pushed is stored at that address, low order byte first. In a pop operation, the data to be popped is retrieved from that address, again low order byte first, and then the SP register is incremented by two. Some instructions, such as a FAR CALL, or FAR RETURN push or pop more than two bytes on the stack. It is also possible to allocate temporary storage on the stack. You simply decrement the SP register by some amount, use that memory, and then increment the SP register to release the memory. This is known as a stack frame. In fact, the BP register makes is very easy to do so. You use BP to separate arguments from local data - arguments will be above BP, and local data will be below BP. Memory reference instructions that are relative to BP, i.e. [BP+6] or [BP-48] will automatically use the SS segment register.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Explain The merits of using a deque to implement a stack in data structure?

Explain The merits of using a deque to implement a stack in data structure


Explain difference 8085 and 8086 in detail?

a number (1) because 8085+1=8086


Which register can be changed directly using pop instruction in 8086?

stack segment register


Explain with netdiagram architecture of 8086 microprocessor?

i dont know the answer


What is the SP pointing register's default memory segment?

The default segment for SP (Stack Pointer) relative memory accesses in the 8086/8088 is SS (Stack Segment).


How many base registers are there in 8086?

There are four base registers in the 8086/8088; Code Segment (CS), Data Segment (DS), Stack Segment (SS), and Extra Segment (ES).


List the unconditional branch instructions in 8086 with examples and explain?

jmp


What is the basic difference between instruction RET and IRET in 8086 microprocessor?

RET pops the PC off of the stack, while IRET pops both the flags and the PC off of the stack.


Write a sequence of instruction to exchange two register contents using stack in 8086 processor?

To exchange two registers, say the BX and CX registers, in the 8086 using the stack, you can use...PUSH BXPUSH CXPOP BXPOP CX... Of course, this is for 16 bit operation. If you want 8 bit operation, you will need to do more than that, because stack operations are always 16-bit operations.


What is the resource requirement of stack in a data structure?

no answer


Why are programme counter and stack pointer register 16 bit registers?

The program counter (PC) and stack pointer (SP) registers are 16-bit registers in the 8085 and in the 8086/8088 because that is how Intel designed the processors.


Can stack be called fifo data structure?

No. A stack is a LIFO (Last In First Out) data structure.A queue is a FIFO (First In First Out) data structure.