Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

VERY IMPORTANT: You are restricted to the core instructions for this assignment. DO NOT use any pseudo or extended instructions. Turn off the option on

VERY IMPORTANT: You are restricted to the core instructions for this assignment. DO NOT use any pseudo or extended instructions. Turn off the option on MARS under settings that allows the use of these instructions, This means you must use the standard formats and no use of li or la instructions.

Write a MIPS assembly language program to do the following.

DONT USE LI, LA, JAL, JR OR PSEUDO INSTRUCTIONS

Print your name

Prompt the user for the number of times to repeat the testing of your logic for step 4. (See the

example below.)

Read an integer

If the integer that is input is less than 1

Print an error message. Else

Repeat the following steps the number of times input in step 3. This will require a loop.

Read in a list of integers ending with a 0. The 0 marks the end of the input and is not

considered part of the list.

Print the largest and smallest numbers in the input list. If only a zero appears in the list,

print an error message

Print an ending message and then end your program. Note: your program should not end with an

error message.

Example input and output for the program. In this example, the number of times the logic is tested in this example is 3.

Tom Jones

Enter the number of times to test: 3

Enter a number 1 Enter a number 0

The smallest number is 1 The largest number is 1

Enter a number 0

Error: there are no numbers to test

Enter a number -1 Enter a number 8 Enter a number 5 Enter a number 0

The smallest number is -1 The largest number is 8

Program complete Specifics:

Use only the instructions covered to date. No jal and jr. Do not use any pseudo-instructions.

Do not store any values into memory. There are no lw or sw instructions in this program. Just read the integers and process them.

Document every instruction.

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

Evaluate (py+uo p2+o2 (py+uo (p2y2+c p2+o2 1 ds exp 2 2. p2+o2

Answered: 1 week ago

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago