flat assembler
Message board for the users of flat assembler.
Index
> Windows > DLL export function problem.. |
Author |
|
revolution 02 Mar 2011, 20:15
Overflowz wrote:
|
|||
02 Mar 2011, 20:15 |
|
Overflowz 03 Mar 2011, 11:51
revolution
I don't understand, what do you mean ? |
|||
03 Mar 2011, 11:51 |
|
revolution 03 Mar 2011, 12:08
Try this:
Code: ;... push edi ;... sub esp,30 ;... add esp,30 ;swapped pop edi ;swapped ;... |
|||
03 Mar 2011, 12:08 |
|
Overflowz 03 Mar 2011, 12:40
revolution
Do you mean like this ? anyway this doesn't work.. Code: proc dec2str, num, sys mov eax,[num] mov ecx,[sys] push edi sub esp,30 loop1: xor edx,edx div ecx dec edi add dl,0x30 cmp edx,0x3a jae stage2 jmp decv stage2: cmp edx,0x3f jbe conv decv: mov [edi],dl test eax,eax jnz loop1 jmp return_value conv: add dl,0x27 jmp decv return_value: invoke MessageBox,0,ebp,ebp,MB_OK+MB_ICONINFORMATION add esp,30 pop edi ret endp |
|||
03 Mar 2011, 12:40 |
|
revolution 03 Mar 2011, 13:29
You still have to set the value of edi upon entry. Only change the order of the two instructions I showed as swapped above so as to properly restore your stack.
|
|||
03 Mar 2011, 13:29 |
|
Overflowz 03 Mar 2011, 14:12
revolution
Mate, I don't understand too much here.. Can you just fix my code instead of suggesting me things and I'll understand what you're saying Thanks. |
|||
03 Mar 2011, 14:12 |
|
Overflowz 03 Mar 2011, 22:23
Bump.. Nobody else can solve this ?
|
|||
03 Mar 2011, 22:23 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.