• Embed Doc
  • Readcast
  • Collections
  • 1
    CommentGo Back
Download
 
1Mohd. Moinul Hoque,Lecturer, CSE, AUST 
CSE 307-Microprocessor
Chapter 9Stack and Subroutines
 
2Mohd. Moinul Hoque,Lecturer, CSE, AUST 
CSE 307-Microprocessor
The Stack
The stack is an area of memory identified by theprogrammer for temporary storage of information.
The stack is a LIFO structure.
 – Last In First Out.
The stack normally grows backwards intomemory.
 – In other words, the programmerdefines the bottom of the stackand the stack grows up intoreducing address range.
MemoryBottomof theStack The Stack growsbackwardsinto memory
 
3Mohd. Moinul Hoque,Lecturer, CSE, AUST 
CSE 307-Microprocessor
The Stack
Given that the stack grows backwards intomemory, it is customary to place the bottom ofthe stack at the end of memory to keep it as faraway from user programs as possible.
In the 8085, the stack is defined by setting theSP (Stack Pointer) register.
LXI SP, FFFFH
This sets the Stack Pointer to location FFFFH(end of memory for the 8085).
The Size of the stack is limited only by theavailable memory
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...