Wednesday, September 11, 2013

PUSH & POP
STACK:
it s part of RAM in which data will store temporary during execution of program.
STACK work on last in first out principal.to store and retrieve data during program execution in stack push and pop instruction work for it.
PUSH:
its used to store data into stack.
POP:
to retrieve data from stack.
SP:
stack pointer is 8 bit register which store value of top of the stack.
by default stack pointer contain 07h.

PUSH AND POP OPERATION:

PUSH:
using push operation stack pointer increased first and then content of register or memory will store on that stack location which stored in SP.
here SP contain =07h

PUSH R6;SP increased by one and contain of R6 store into 08 location.
PUSH R1;SP increased again by one and contain of R1 stored into 09 location.
PUSH R4;SP increased again by one and contain of R4 stored into 0A location.

POP:
In this retrieve data first and then stack pointer decreased by one.
if we write
POP 20h;then content at 0Ah location will copy into 20h then stack pointer decrease by 1.
POP 21h;then content at 09h location will copy into 21h then stack pointer decrease by 1.

-----------------------------------------------------------------------------------------------------------------------
 NEXT: serial communication                                        PREVIOUS:how to access external memory






Categories: , , , ,

14 comments:

Anonymous said...

This is not right as we can't use push or pop instructions with register names as 8051 stack mnemonics have no way of determining the register banks. Thus addresses for most of the registers should be used.

Subhra Mukherjee said...

How push and pop is useful in interrupt handling in 8051

Uttarakhand01 said...

Randi MCA kyu kra jb itna nhi aata hrami

kirankumar said...

Great explanation by the author
Sanjary Kids is one of the best play school and preschool in Hyderabad,India. Give your child the best preschool experience by choosing the best playschool of Hyderabad in Abids. we provide programs like Play group,Nursery,Junior KG,Senior KG,and provides Teacher Training Program.
Preschool in hyderabad

kirankumar said...

Excellent blog posts information

Sanjary Academy is the best Piping Design institute in Hyderabad, Telangana. It is the best Piping design Course in India and we have offer professional Engineering Courses like Piping design Course, QA/QC Course, document controller course, Pressure Vessel Design Course, Welding Inspector Course, Quality Management Course and Safety Officer Course.
best Piping Design Course
piping design course with placement
Piping Design Course
Piping Design Course in Hyderabad ­
Piping Design Course in India­
best Piping Design institute
best institute of Piping Design Course in India

kirankumar said...

Thanks for sharing the updated information it will useful and helpful

Pressure Vessel Design Course is one of the courses offered by Sanjary Academy in Hyderabad. We have offer professional Engineering Course like Piping Design Course,QA/QC Course,document Controller course,pressure Vessel Design Course,Welding Inspector Course, Quality Management Course, Safety officer course.
Welding Inspector Course
Safety officer course
Quality Management Course
Quality Management Course in India

Anonymous said...

Sushant Singh Rajput Last Movie Dil Bechara 2020 Download HDRip
Dil Bechara 2020 FHD Download Here

Ruhi Sukhla said...

This needed to be said, thanks for saying it…

BA First Sem Result University Of Faizabad

ba time table said...

प्यारा ब्लॉग! याहू न्यूज पर सर्फिंग करते समय मुझे आपकी बीए फाइनल टाइम टेबल वेबसाइट मिली।

बीए टाइम टेबल said...

आप यहां क्लिक करके बीए तृतीय वर्ष टाइम टेबल देख सकते हैं।

BA 3rd Year Time Table said...

These are genuinely fantastic ideas about blogging really. You have touched some very nice points here. Please keep up this good writing.

deepak prajapati said...

क्या आपको भारत की जनसंख्या कितनी है ये पता है?

dhanshree pannel chart said...

Almust read post! Good way of describing and pleasure piece of writing. Thanks!

royal meenakshi pannel chart | kalyan matka pannel chart | shubhank pannel chart.

Alex said...

Your page has got very important information which I was looking for for a long time this is the best page of 2023 see rest of the information
Syed Rizwan Ahmed Wiki
Cecilia Asoro wiki
Lisa Marie Presley Wiki
Erika Donalds Wiki

Related Posts Plugin for WordPress, Blogger...
Subscribe to RSS Feed Follow me on Twitter!