Quote:
> E849000000 call 0040105C ;call to some place in the program
> some place:
> FF2564304000 jmp dword ptr [00403064] ;a jmp to the message box
> So my question is why the program not jumps directly?
> In programs with other languages it does!
The thing you are calling is in a DLL. Its location is not known
until the loader attaches your program to that DLL. At that time,
the loader patches a *single* location in your program for each
entry point you call in the DLL. Since you might call the same
entry point more than once, it needs a level of indirection to
have all calls use the same patched address.
If the compiler knew that the call was to a DLL and wanted to
use that knowledge it could "call dword ptr [???]" to represent
the indirection within one instruction.
If the compiler doesn't do that (since you used TASM, not a
compiler, I think it is in your control) then the call must
look like an ordinary direct call. The linker can't change
a direct call to an indirect call, so it must create an
indirect jmp for the direct call to go to.
--
http://www.erols.com/johnfine/
http://www.geocities.com/SiliconValley/Peaks/8600/