News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Calculation or Buffer Problem

Started by ragdog, July 22, 2008, 10:27:28 PM

Previous topic - Next topic

ragdog

hi

I have a little trouble with my calculation routine for
Imagebase-VA=RVA

the result must stored in Pe.Rva
   
I do not know whether the routine correctly calculate


     lea edi,offset Pe.Rva
    mov esi,offset Pe.ImageBase ;00400000 -
    mov edx,offset Pe.VA        ;004040A8
     sub edx,esi                      ;result = 000040A8
invoke SetDlgItemText,hWnd,IDC_RVA,edi


Have your an idea?

Please!

greets,
ragdog

BlackVortex

You mean VA-imagebase=RVA  !!!

It's just a subtraction  :-(  Am I missing something here ?

Why do you move into the registers the offsets and not the dwords themselves ?

like :
mov esi,dword ptr [Pe.ImageBase]