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

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]
Syscall.asm:
# Definitions of various useful system calls for MIPS assembly.
# This file must be included using .include "SysCalls.asm" rather
# than being assembled as a separate module.
# Written by John Cole starting January 2,2022
.eqv SysPrintInt 1
.eqv SysPrintFloat 2
.eqv SysPrintDouble 3
.eqv SysPrintString 4
.eqv SysReadInt 5
.eqv SysReadFloat 6
.eqv SysReadDouble 7
.eqv SysReadString 8
.eqv SysAlloc 9
.eqv SysExit 10
.eqv SysPrintChar 11
.eqv SysReadChar 12
.eqv SysOpenFile 13
.eqv SysReadFile 14
.eqv SysWriteFile 15
.eqv SysCloseFile 16
.eqv SysExitValue 17
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 Please write a full program thank you :((

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!