Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this exercise, your task is to write a complete MIPS32 assembly language program, 0. Begin 1. The program shall def9ne a global int array

For this exercise, your task is to write a complete MIPS32 assembly language program,

image text in transcribed

0. Begin 1. The program shall def9ne a global int array named divs of size 100, i.e., the indices of divs are 0, 1, 2, ..., 99 2. Output prompt string for lower as shown in example output. 3. Read an int from the keyboard and assign it to lower. 4. Set upper to lower + 99. 5. Initialize an array index variable named i to 0 (we will use it to index into the divs arrays) 6. For each n in [lower, upper] do the following a. Determine dan) b. Write the value of d(n) to divs[i] c. Increment i d. Increment n e. When ns upper, continue the loop in Step 6(a). Otherwise, continue to Step 7. 7. For each jin (O, 99] do the following. a. Output (lower + j) followed by space char'' followed by divs[j] followed by newline char ' ' 8. End. Example Output Here is the output your program would produce when implementing the revised pseudocode and when the user enters 1000 for lower Enter lower? 1000 1000 16 1001 8 10028 1098 12 1099 4 0. Begin 1. The program shall def9ne a global int array named divs of size 100, i.e., the indices of divs are 0, 1, 2, ..., 99 2. Output prompt string for lower as shown in example output. 3. Read an int from the keyboard and assign it to lower. 4. Set upper to lower + 99. 5. Initialize an array index variable named i to 0 (we will use it to index into the divs arrays) 6. For each n in [lower, upper] do the following a. Determine dan) b. Write the value of d(n) to divs[i] c. Increment i d. Increment n e. When ns upper, continue the loop in Step 6(a). Otherwise, continue to Step 7. 7. For each jin (O, 99] do the following. a. Output (lower + j) followed by space char'' followed by divs[j] followed by newline char ' ' 8. End. Example Output Here is the output your program would produce when implementing the revised pseudocode and when the user enters 1000 for lower Enter lower? 1000 1000 16 1001 8 10028 1098 12 1099 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Financial Pricing Models In Continuous Time And Kalman Filtering

Authors: B.Philipp Kellerhals

1st Edition

3540423648, 3662219018, 9783540423645, 9783662219010

More Books

Students also viewed these Finance questions