I already wrote somewhere earlier I altered it, but the actual address is : 7d44568h
Posted on 2004-06-14 14:11:08 by flapper
MASM only sets up a stack frame if you use locals and/or have arguments to the proc...
Posted on 2004-06-14 14:33:13 by f0dder
That is an unusually sky high address. Why don't you just check in a debugger or display the address with wsprintf and MessageBox?

f0dder: Ah, ok. Well I usually put everything that's bigger than 6/(Number of uses-1)+5 in a subroutine :P I very rarely give much thought into the timing of the code, because in most cases it's fast enough anyway. The last time I did was when writing a NES game... In the end it turned out quite fast, actually ;)
Posted on 2004-06-14 17:20:20 by Sephiroth3
Yeah, my point was more that you shouldn't put small pieces of speed-sensitive code in subfuncs... like, putpixel or whatever ;) (not that you should ever do any code that depends on putpixel, but that's another matter).

That's where HLLs have an advantage to assembly, btw - they can inline functions. You can gain some of this in assemble by the use of macros, but it's a bit clunky in comparison (because of the lack of auto register allocation etc.)
Posted on 2004-06-14 17:45:40 by f0dder
7d44568h? Are you coding a dll or had fooled with base address?
Posted on 2004-06-15 08:08:33 by roticv
The caller is an EXE, my file is a DLL
Posted on 2004-06-15 11:23:00 by flapper
I think you should use a debugger and see what's really at ESP when the function is called.
Posted on 2004-06-15 11:46:29 by Sephiroth3
Then how is it possible that your return address is 7d44568h?
Posted on 2004-06-15 12:12:36 by roticv