- #1
unoathingshad
- 4
- 0
Ok so me and a my group are writing a hangman program in mips, we came up with the idea of dividing the program to 3 subroutines 1 that reads and writes to a file, one that picks a random word from a word bank in the text file i guess, and one that does the rest like getting the word replacing it with -,-,- while the user is guessing and so on.
i have done this program before in java but its much easier it seems, i picked the subroutine that gets a random word but i can't think of a way to get it in mips.
What i thought of doing was loading a random word from memory that the first subroutine was suppose to have loaded, then get a random address of where the word is stored using something like
li $v0, 42
but i still very uncertain on how to go about this, any advice please and tank you :)?
i have done this program before in java but its much easier it seems, i picked the subroutine that gets a random word but i can't think of a way to get it in mips.
What i thought of doing was loading a random word from memory that the first subroutine was suppose to have loaded, then get a random address of where the word is stored using something like
li $v0, 42
but i still very uncertain on how to go about this, any advice please and tank you :)?