Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5.3 Rewrite the following program fragment that is written using the GPR instruction set for execution on a CISC processor that provides the same

 

5.3 Rewrite the following program fragment that is written using the GPR instruction set for execution on a CISC processor that provides the same instruction set as the GPR processor but allows the register addressing mode to be used on the input operands or destination of any instruction. (Yes, the code fragment will execute correctly as written on such a processor. Your goal should be to reduce the number of instructions as much as possible.) Assume that the program ends after the last instruction in the fragment, so that the only goal of the program should be to have the correct value written into memory at the end. LD r1, (r2) LD r3, (r4) LD r5, (r6) LD r7, (r8) DIV r9, r1, r3 ADD r10, r9, r5 SUB r11, r7, r10 ST (r12), r11

Step by Step Solution

3.36 Rating (146 Votes )

There are 3 Steps involved in it

Step: 1

The following code is written by assuming the r2 r4 r6 r8 and r12 contents are decimal values as ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Architecture Fundamentals And Principles Of Computer Design

Authors: Joseph D. Dumas II

2nd Edition

1032097337, 978-1032097336

More Books

Students also viewed these Programming questions