Is there anyway to generate a random number with assembly MIPS without using sycall 42? Because if I use it, qtspim v9.17 says "Uknown system call: 42"
Asked
Active
Viewed 572 times
0
-
This is duplicate of weakly answered: https://stackoverflow.com/questions/44875451/generate-random-integer-in-mips-which-compiles-with-qtspim (the first comment is very good hint, but requires serious effort to implement). *"Is there any way ..."*, no, it's impossible to generate random number. But you can generate pseudo-random one. The difficulty depends on how strong randomness you need, as you have very limited sources of entropy in qtspim. Needing encryption-grade RNG would probably require lot of user inputs to gather enough entropy. Something for a game can do with a bit of entropy. – Ped7g Aug 24 '17 at 12:41
-
You can also check this recent x86 answer to get maybe few ideas how to get some entropy: https://stackoverflow.com/a/45590598/4271923 – Ped7g Aug 24 '17 at 12:44