Answered step by step
Verified Expert Solution
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 ) . 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 to
Using MARS, write a MIPS assembly language program to produce a random integer from
to 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 to called BingoArray
Write code that runs the FisherYates Shuffle to randomize the array
You will use the syscall Random Int Range. Add to your SysCall.asm file
eqv SysRandIntRange
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 BingoArrayi and BingoArrayj
Restore the used variables from the stack
The pseudocode for the FisherYates Shuffle is
To shuffle an array a of n elements indices n:
for i from n down to do
j random integer such that j i
exchange aj and ai
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
eqv SysPrintInt
eqv SysPrintFloat
eqv SysPrintDouble
eqv SysPrintString
eqv SysReadInt
eqv SysReadFloat
eqv SysReadDouble
eqv SysReadString
eqv SysAlloc
eqv SysExit
eqv SysPrintChar
eqv SysReadChar
eqv SysOpenFile
eqv SysReadFile
eqv SysWriteFile
eqv SysCloseFile
eqv SysExitValue
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:
Please write a full program thank you :
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started