Feedback on module 5

Feedback on module 5

by Olid Hassan Mahim -
Number of replies: 0

1. What was your learning from this experiment module?

In this experiment I have learnt  to save any data temporarily using stack. I learned the push instruction which is used to save the data in a stack. The pop instruction which is used to restore the data from a stack. The LIFO ( Last input first output) system which is the way how data are save and restored from the memory. The stack pointer and the offset address of the data. 

2. why we use stack segment?

We use stack segment because we have only four registers(AX,BX,CX,DX) in the assembly language. we need a lot of registers for storing variables these four registers are not enough. we need to reuse these registers. using the stack segment to reuse the registers repeatedly. This can be done by storing the present value of a register in the stack segment. we can easily store any data in the stack temporarily using push instruction and restore the data using pop instruction.