News:

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

Converting C++ Code to Asm problem

Started by Dark_C0der, February 12, 2012, 08:26:05 AM

Previous topic - Next topic

Dark_C0der

Hi there i have some problems to convert c++ code to asm :(

Here is my C++ code in abbreviated form:




PDWORD pVar1;           
PWORD pVar2;       
DWORD n; 

WORD Ordinal = pVar2[n];

pVar1[Ordinal]);

   

how do I deal with the array of pointers?

Sorry for my bad english :(

qWord

mov eax,pVar2
mov ecx,i
movzx ecx,WORD ptr [eax+ecx*2]
mov eax,pVar1
mov eax,[eax+ecx*4]
FPU in a trice: SmplMath
It's that simple!