Question: Question 2. A stack architecture A stack architecture is used in many calculators. It uses a collection of registers called the stack, with the restriction

 Question 2. A stack architecture A stack architecture is used in

Question 2. A stack architecture A stack architecture is used in many calculators. It uses a collection of registers called the stack, with the restriction that you access only the piece of data on the top of the stack. When you puslh a new data value onto the stack, it goes on top (TOS), and everything else gets pushed down- like the "pop-up" plate dispensers in a cafeteria. When you pop a data value off of the stack, it comes off the top, and everything else moves up the stack. Math operations pop the top two pieces of data off the stack, do the math, and push the answer back on the stack. Suppose that the stack architecture has a 120 ns clock cycle, and the following instructions: PUSH . reg addr2> Adds the data in the two registers indicated together, and puts the result in the register indicated by ADD R2. Ri R21 Regs [R21 + Regs [RI MUL Adds the data in the two registers indicated together, and puts the result in the register indicated by . MUL R2 R R21 Regs RIl Write assembly language code for the high-level code fragment A -C (A + B) +D on the two-address load-store architecture. Do not use more memory locations or registers than you need. Include RTL comments. What is the IC for your code? How long will it take to run

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!