Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
code to copy from a stack to a register
This is from a homework question in a textbook that pretty much sucks. I've been unable to find any reference to this action in the chapter the problem is from, and have reached the point of desperation. I'm trying to find the code to copy a particular item from a stack into a separate register.
Specifically the question is:
Register R5 is used in a program to point to the top of a stack. Write a sequence of instructions using the INDEX, AUTOINCREMENT or AUTODECREMENT adressing modes to perform the following:
Copy the 5th item from the top into R3
the textbook I'm using is "Computer Organization, fifth edition" by Hamacher, Vranesic and Zaky.
Any help or direction to different resources would be much appreciated.