I have run into a problem. I've found a pointer for what I'm looking for, but it has a negative offset.
[80AF8920]-151998
How would I go about doing this with a code? I know 14XXXXXX adds the offset, but how to you subtract?
lol better you try to make it to a ASM C2 code.
it's pointerless
Use the 5A code type and the two's complement of your negative offset.
5A010 : po = po+XXXXXXXX
Your code probably looks something like this
48000000 80AF8920 # get [80AF8920] and put it into the po
5A010000 FFFDAE42 # po = po - 151988
14000000 YYYYYYYY # write Y to [80AF8920]-151998
codetype 5A010 substract?
48000000 80AF8920
5A010000 FFFDAE42<-- why FFFDAE42? how did you substract it?
14000000 YYYYYYYY
E0000000 80008000
oh okay.
yep just try dcx2's code^^
FFFDAE42 = -151998
It's called "two's complement". When you add a negative number to something it's like subtracting, right?
Use Windows Calculator. Make sure you're in Scientific Mode (View -> Scientific). Copy and paste -151998. Hit F5 to convert to Hex. It will give you 64 bits, so just use the last half.
it says : 251BE :confused:
You didn't hit -
Also, if you type it in by hand, you have to hit enter before F5. If you copy and paste, you don't have to hit enter.
yes if I hit F5 it change it to hex.
You can also use the data converter in the arsenal on the code database to convert negative numbers to hex.
http://geckocodes.org/index.php?arsenal=3
Don't use a - in front of hex. Convert the hex to decimal, then put the - in front of it and use James' tool.
Or, if you're in Windows Calculator, and you want to convert a hex number to its twos-complement negative equivalent
1) make sure you're in Hex mode (F5)
2) Enter the hex value
3) Press F9 or click the +/- button.