Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task-3 [35 Marks] In this task we will write a program in MIPS assembly language that should do the following functionality: Prompt the user to

image text in transcribed

image text in transcribed

Task-3 [35 Marks] In this task we will write a program in MIPS assembly language that should do the following functionality: Prompt the user to enter a number. It should be a number between 1 and 16. Your program should check the validity of user input and should terminate the program if an invalid number is entered after displaying an appropriate message. Prompt the user again for a number. This time the number should be in the range of 5 to 10. Your program should again check the validity of the input and terminate the program in case of an invalid input. Based on the input provided by the user your program should then display an arithmetic table on the console. A sample run of the program is shown below. The values in bold face represent the user response. The skeleton code is shown below. Make sure that your program MUST use the same functions. No additional function is allowed. You can use either the conventional registers or stack memory for input arguments / return address. ######## ########## #Name: #Roll Number: #Name of program: al-t3.asm #Course Code: #Section: ########## ######## .data #your data segment goes here .text main: #prompt the user to enter table number jal inputNumber #prompt the user to enter range of table (Note that same function is #used) jal inputNumber #display table jal displayTable li $v0,10 syscall inputNumber: displayTable: ######END OF PROGRAM######## Sample Run Enter table number: 4 Enter range of table: 5 The table is shown below: 4x 1 = 4 4 x 2 = 8 4 x 3 = 12 4 x 4 = 16 4 x 5 = 20

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

=+3. What types of job are best recruited internally? Externally?

Answered: 1 week ago