Skip to content

as3 push negative?

-migrated-

5 posts

as3 push negative?

Posted Feb 28, 2011 5:37 am

I have forgotten how to push a negative number i know that

24 64 == push 100

but, how would you for instance push -100?

Re: as3 push negative?

Posted Feb 28, 2011 8:38 am

24 pushes a signed integer, so any value above 7F (127) becomes negative. 80 is -127 whilst FF is -1. 9B is -100

Re: as3 push negative?

Posted Feb 28, 2011 12:51 pm

If you want a dirty way to find negative hex values, go to windows Calculator, scientific mode, type in the number you want (let's say -42), press enter, and then choose the Hex option (on the left side.)
You'll get like FFFFFFFFFFFFFFD6. The value you want is the last byte: d6.
As a side note, you can achieve this effect if you select the Byte option that appears below the input/output screen when on Hex.