Generate random integer in MIPS which compiles with QtSpim

青春壹個敷衍的年華 提交于 2019-12-08 08:57:27

问题


So I've seen a lot of questions on generating random integers in a MIPS program using MARS and syscall 42 and that's ok. The problem is that I need to generate a random integer for a program compiled with QtSpim, which has no syscall for 42 or however for calls greater than 17. I can't figure out getting something like a random value from the system like syscall 30 in MARS which gives the system time.

Is there a way to get a random address or hex value to use for a random int generator using xor operations ?

Any help would be appreciated.

来源:https://stackoverflow.com/questions/44875451/generate-random-integer-in-mips-which-compiles-with-qtspim

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!