Write and assemble a program to execute the following HLL statement.             int r = 0; int n = 10;             for (int i=0; i<600; i++) {             r = r + n; n = n +1; }   Use R20 to store the result of (r). Note that the final answer is not the correct answer as R20 is an 8-bit register (0-255) while the expected result is greater than 255.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter2: Introduction To Systems Architecture
Section: Chapter Questions
Problem 2VE: A(n) __________ is a storage location implemented in the CPU.
icon
Related questions
Question

Write and assemble a program to execute the following HLL statement.

            int r = 0;

int n = 10;

            for (int i=0; i<600; i++) {

            r = r + n;

n = n +1;

}

 

Use R20 to store the result of (r). Note that the final answer is not the correct answer as R20 is an 8-bit register (0-255) while the expected result is greater than 255.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Fundamentals of Computer System
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning