Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

: Write a MIPS program that uses Procedures to create an Electronic Bingo Cage Machine ( similar to the one used in class ) .

: Write a MIPS program that uses Procedures to create an Electronic Bingo Cage
Machine (similar to the one used in class). The Bingo cards have decimal numbers from -31 to
32.
Using MARS, write a MIPS assembly language program to produce a random integer from -31
to 32 inclusive when the user hits enter. The program should not repeat a number once it has
been called. The procedure you will implement is:
Create an array of data from -31 to 32 called BingoArray
Write code that runs the Fisher-Yates Shuffle to randomize the array
You will use the syscall 42 Random Int Range. Add to your SysCall.asm file
.eqv SysRandIntRange 42
Your code should call a procedure called SWAP. The SWAP procedure:
Store any variables you will use on your procedure on the stack
Inputs: i, j
Exchange BingoArray[i] and BingoArray[j]
Restore the used variables from the stack
The pseudo-code for the Fisher-Yates Shuffle is
To shuffle an array a of n elements (indices 0..n-1):
for i from n1 down to 1 do
j random integer such that 0<= j <= i
exchange a[j] and a[i]
Then assemble and run the program with MARS to show and capture the output for the first 10
bingo calls in decimal and show it for two different runs

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 A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago