i use tasm 5.2
i try to use Laptonic MD5 algo implemantation in my prog
so i call The MD5 routine no prob
then endianrev the string no prob
but if i wsprintf the reultsums
the stacks pointers are not correct
i tried to print by messageboxa,0,offset MD5String,offset MD5String,0 but it does nothing
when i use w32dasm when i call messgaebox it goes somewhere and raise an exception

can someone put a real working md5 implemenation in TASM format please
if someone knows something about this please postit
Posted on 2003-09-19 04:02:58 by Thor0Asgard
wsprintf is c call convention. Did you balance the stack or did your compiler do it for you? (Not too sure about tasm, but I know masm will automatically fix the stack for you)
Posted on 2003-09-19 04:15:57 by roticv
how to fix the stack in guess a add esp,X
do i have to add a add esp,24 ?
Posted on 2003-09-19 04:18:33 by Thor0Asgard
Or simply use wvsprintf, which works like all other api calls.
Posted on 2003-09-19 05:56:34 by _js_
I suppose so. But some assemblers do balance the stack for you, but I am not too sure abt tasm. Yes, the correct method is add esp, numberparameteres*4

IIRC, wvsprint is like wsprint, in the sense that they both use c-calling conventions.
Posted on 2003-09-19 07:06:50 by roticv
Change your wsprintf declaration to


_wsprintfA procdesc c :dword, :dword, :dword:? ;three parameters must and optianl as much as you want
wsprintf equ _wsprintfA

usage
call wsprintf,offset mybuffer,offset fmat,eax,ecx,edx ... etc

Then TASM will add add esp,4*HOWMANYPARAMETERS automatically.
Posted on 2003-09-19 07:21:45 by LaptoniC