hexadecimal addition

K

king

I have a register lets say F0200088 (hexadecimal number)

And I want to jump 7 dwords so that I will reach F02000B0 (i.e 88 will
become B0 in hex)

How can I do hexa addition in perl to get this value of F02000B0.

I tried this but not getting it.

sprintf "%X\n",oct("0xF0200088")+oct("0x08");
 
J

Jürgen Exner

king said:
I have a register lets say F0200088 (hexadecimal number)

And I want to jump 7 dwords so that I will reach F02000B0 (i.e 88 will
become B0 in hex)

How can I do hexa addition in perl to get this value of F02000B0.

sprintf "%X\n",oct("0xF0200088")+oct("0x08");

But 0xF0200088 + 0x08 is 0xF0200090 and not 0xF02000B0. Are you adding the
wrong numbers?\

jue
 
D

Doug Miller

I have a register lets say F0200088 (hexadecimal number)

And I want to jump 7 dwords so that I will reach F02000B0 (i.e 88 will
become B0 in hex)

On what system is a dword 5.57143 bytes long?

0xF02000B0 - 0xF0200088 = 0x28 = decimal 40
How can I do hexa addition in perl to get this value of F02000B0.

I tried this but not getting it.

sprintf "%X\n",oct("0xF0200088")+oct("0x08");

0xF0200088 + 0x8 = 0xF0200090
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top