Jump to content

How to generate a random number in limit space


1 post in this topic

Recommended Posts

Posted

Hello there, i need some help about arm modding, first here is the code region look like:

spacer.png

 

At now I cam use 'NOP' to remove the

CMP RO, #1
BNE loc_A5664C

to run the MOV R1, #4, I also can set #4 to #3 set it value to 3.

But my question is how can i generate a random number to set R1 other values like betweent 2 and 4,  3 and 4? i tried use BL to other function but program itself will stuck nothing will be execute, any help?

 

P.S: here's my random number generate code already get, but i dont know where should i put it

MOV	R1, #0
MOV	R2, #0x64
BL	#0x11A982C
CMP	R0, #0x55
BHI	#0x1C
MOV	R1, #4
B	#0x20
MOV	R1, #3

 

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines