Home > Software engineering >  Assembly instruction to alter for spaceship movement (DEC to MOV)
Assembly instruction to alter for spaceship movement (DEC to MOV)

Time:02-25

I have permission to modify this executable.

A game called Emperor of the Fading Suns has spaceships in it. When you launch into orbit with a specific ship, said ship lose one movement point. Longer assembly image

Thanks for the tip, I'm really excited about making this a function so I don't have words to describe how happy I am for anyone to tell me how to do this. If there is additional info required then I'll post a longer version and link to it.

CodePudding user response:

The trick is to observe that the instruction at 457dd0 and 457dd6 are the same and can be combined.

457dce  8b45e4    mov eax, [ebp-1c]
457dd1  7506      jnz 457dd9
457dd3  c6402f00  mov byte ptr [eax 2f], 0
457dd7  6690      nop
457dd9  ...

You should ensure that there are no jumps to 457dd0 or 457dd6.

  • Related