Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using syscalls Tuis ts DA syscall is a function that is provided by the operating system of the MIPS computer, not the MIPS architecture itself.

image text in transcribed
Using syscalls Tuis ts DA "syscall" is a function that is provided by the operating system of the MIPS computer, not the MIPS architecture itself. Examples are the ability to print data to the MIPS computer's display monitor, obtain the time of day, etc. Open the MARS help screen, and select the syscalls tab to bring up the available syscalls. Find and review the section "How to use SYSCALL system services." You will use syscall 41, "random int." Use of a syscall requires a series of MIPS instructions. You must provide the "setup" of a syscall by setting values in registers, then make the syscall itself. MIPS instruction to put the value 41 into register Sv0. This specifies which syscall will be executed. The random integer syscall needs no other parameters. In general, a syscall may require that other parameter values be placed in registers MIPS instruction syscall just the word "syscall" by itself on a line) The outcome of this syscall is that a random number will have been placed into a register. Use the documentation in the help page to find out which register. Write a loop that will generate 6 random integers and store them in arrayB Write instructions to prepare for a future loop, including the following actions: . Initialize a loop counter Put the address of arrayB into a register, using the la instruction. Write instructions to complete the body of the loop, including the following actions: . Syscalls for random integer (see above) Store that random integer into the the arrayB at the correct location. Modify the base address for the next iteration of the loop Modify the loop counter value

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

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Does the business have a sound marketing plan?

Answered: 1 week ago