Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Objective: 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
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 0dotsn-1):
for i from n-1 down to 1 do
jlarr random integer such that 0ji
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. Include screenshot(s) showing results
of your program execution in your PDF report. Show screenshots of your MARS execution Data
Segment window in decimal showing your BingoArray in memory after the Fisher-Yates Shuffle
for each Run. The data in your memory should be correlated to your program execution screen
shot.
Here is an example of the screen shot of the Bingo machine for one run:
Lets Play Bingo! Press Enter to get the next Bingo call:
-1
2
8
14
-31
24
9
32
-3
-6
image text in transcribed

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

Advances In Databases 28th British National Conference On Databases Bncod 28 Manchester Uk July 2011 Revised Selected Papers Lncs 7051

Authors: Alvaro A.A. Fernandes ,Alasdair J.G. Gray ,Khalid Belhajjame

2011th Edition

3642245765, 978-3642245763

More Books

Students also viewed these Databases questions

Question

What are some things you could do to become a better listener?

Answered: 1 week ago