I want to generate random words in MIPS. I know how to generate random numbers, I just want a random word from a word bank. I have tried this but I have no idea how to print them.
.data
### WORD BANK ###
a0: .asciiz "computer"
b1: .asciiz "processor"
c2: .asciiz "motherboard"
d3: .asciiz "graphics"
e4: .asciiz "network"
f5: .asciiz "ethernet"
g6: .asciiz "memory"
h7: .asciiz "microsoft"
i8: .asciiz "linux"
j9: .asciiz "transistor"
k10: .asciiz "antidisestablishmentarianism"
l11: .asciiz "protocol"
m12: .asciiz "instruction"
word: .word a0,b1,c2,d3,e4,f5,g6,h7,i8,j9,k10,l11,m12
.text
la $To,word
How may I choose a random word from a given list?
You could create an Array, then with a forEach Loop with inside an object that generates a random numbers, you display the word of the array that corresponds to random generated number.
THIS IS JAVA CODE, BUT I HOPE IT MIGHT HELP
}