Skip to content
Guest Big Announcement

Freeze value instruction?

Featured Replies

Is there an arm instruction that freezes the default value?

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

Updated by Joka

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

  • Author
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?

  • Author
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?

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

  • Author

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

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

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.