if possible, what is the opcode of a non-relative direct call ?

example:

call 0FFFFFFFFh

i don't know how to do a call of this kind on MASM32 (it gives me an error).

btw, i check opcodes.hlp :



E8 cw CALL rel16 Call near, relative, displacement relative to next instruction
E8 cd CALL rel32 Call near, relative, displacement relative to next instruction
FF /2 CALL r/m16 Call near, absolute indirect, address given in r/m16
FF /2 CALL r/m32 Call near, absolute indirect, address given in r/m32
9A cd CALL ptr16:16 Call far, absolute, address given in operand

9A cp CALL ptr16:32 Call far, absolute, address given in operand
FF /3 CALL m16:16 Call far, absolute indirect, address given in m16:16
FF /3 CALL m16:32 Call far, absolute indirect, address given in m16:32


i think it is the last, but how i work with it without confuse the other 32Bits opcode ?

cya

jean / coder7345

ps: sorry the bad english... :(
Posted on 2002-02-13 17:24:18 by coder
coder7345,

compile using the /Fl switch in masm(or the /l in tasm), and check the listfile...

ancev
Posted on 2002-02-13 21:48:41 by ancev
Call direct uses realtive displacemant. So masm usually ask for
label.
Try inderect.
mov eax,-1
call eax
.data
calladd dd 0FFFFFFFFh
.code
call
E8 - the only way to direct in 32 flat mode. And you can see that
it is relative.
You can of course calculate it knowing base and rva of section
or looking for virtual address in dissasm mode:
.code
start:
;target 0FFFFFFFFh
db 0E8h
dd 0FFFFFFFFh - 401015h
mov eax,eax ; it will be at address 401015h with base
;400000h
@@: call ExitProcess ;
end start
Posted on 2002-02-14 00:34:12 by The Svin
Use this:



LPPROC TYPEDEF PTR PROC
.
.
.
.code
.
.
.
mov eax,AddressToCall
call LPPROC PTR eax


Where 'AddressToCall' is the memory address to call.

-huh
Posted on 2002-02-14 03:38:39 by huh