what i have learn from this experiment and why we use stack segment.

what i have learn from this experiment and why we use stack segment.

by Bulbul Ahmed Bulbul -
Number of replies: 0
I have learn from this module about:
Answer-1. what is stack segment: In computing, a stack is a data structure used to store a collection of objects. Individual items can be added and stored in a stack using a push operation. A stack in which items are removed the top is considered a "LIFO" (Last In, First Out) stack.
also push and pop instruction: 
The easiest and most common way to use the stack is with the dedicated "push" and "popinstructions.
1."push" stores a constant or 64-bit register out onto the stack. The 64-bit registers are the ones like "rax" or "r8", not the 32-bit registers like "eax" or "r8d". 
2."pop" retrieves the last value pushed from the stack.

Answer-2: The stack segment register (SS) is usually used to store information about the memory segment that stores the call stack of currently executed program. SP points to current stack top. To push a value to the stack, the PUSH instruction is used. To pop a value from the stack, the POP instruction is used.