Jump to content

8 posts in this topic

Recommended Posts

Posted (edited)

Is there an arm instruction that freezes the default value?

Like, for example, freezes the default "ammo" value...

Updated by Joka
Posted (edited)

There is nothing that freezes it, I don't think, but what I would do is this:

Default Ammo: 30

sub r1, #0x1 // lets say this is what subtracts your ammo count

mov r1, #0x30 // change it to this

Note: this is just an example

Updated by oZarmo
Posted
4 minutes ago, oZarmo said:

There is nothing that freezes it, I don't think, but what I would do is this:

Default Ammo: 30

sub r1, #0x1 // lets say this is what subtracts your ammo count

mov r1, #0x30 // change it to this

Note: this is just an example

What's the difference if I do mov r1 or mov r0?

Posted
Just now, Joka said:

What's the difference if I do mov r1 or mov r0?

In my example r1 is the register that holds the value for the ammo

Posted
Just now, oZarmo said:

In my example r1 is the register that holds the value for the ammo

No I mean the first register, not the second.

Like MOV R0 or MOV R1?

If it was orignally MOV R0, R3 or something and you changed it to LDR R1, [R7], why change the R0 to R1?

Posted (edited)
5 minutes ago, Joka said:

No I mean the first register, not the second.

Like MOV R0 or MOV R1?

If it was orignally MOV R0, R3 or something and you changed it to LDR R1, [R7], why change the R0 to R1?

I'm saying that if it was originally sub r1, #0x1 and you changed it to mov r1, #0x30 it would set your ammo to 30 everytime, which is the default ammo, instead of subtracting your ammo. Therefore, your ammo wouldn't look like it's change and it looks frozen.

Updated by oZarmo
Posted

Yeah I know but if you changed the sub r1, #0x1 to mov r0, #0x30, would that matter?

Posted (edited)
7 minutes ago, Joka said:

Yeah I know but if you changed the sub r1, #0x1 to mov r0, #0x30, would that matter?

Well then you would set that register as 30 instead of the register that holds our ammo. 

Make sure to get the values of all the registers when you're debugging.

Also I forgot to use a hex calculator it would actually be mov r1, #0x1E

Btw, I don't know if noping it so that nothing happens to your ammo works or not. You might wanna try that.

Updated by oZarmo

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • 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