What is xcall.inc for ?
And when do I need it ?

:stupid:


@str MACRO _str:VARARG
LOCAL @@1
IF @InStr(1, <_str>, <!"> )
_DATA SEGMENT
@@1 DB _str, 0
_DATA ENDS
EXITM <OFFSET @@1>
ELSE
EXITM <_str>
ENDIF
ENDM

xcall MACRO function:REQ, parameters:VARARG
LOCAL psize, paddr, plen
IFNB <parameters>
psize = 0
FOR param, <parameters>
psize = psize + 4
ENDM
IF psize EQ 4
push @str(<parameters>)
ELSE
sub esp, psize
psize = 0
FOR param, <parameters>
IF @SizeStr(<param> ) GT 4
paddr SUBSTR <param>, 1, 5
IFIDNI paddr, <ADDR >
paddr SUBSTR <param>, 6, @SizeStr(<param> ) - 5
lea eax, paddr
mov DWORD PTR , eax
ELSE
mov DWORD PTR , @str(<param> )
ENDIF
ELSE
mov DWORD PTR , @str(<param> )
ENDIF
psize = psize + 1
ENDM
ENDIF
ENDIF
call function
ENDM
Posted on 2002-07-02 20:48:44 by andy981
Depends if you like it. For more detailed discussion http://www.asmcommunity.net/board/index.php?topic=6187&highlight=xcall :)
Posted on 2002-07-02 21:06:25 by stryker
It is just a faster method of invoke created by stryker.
Posted on 2002-07-03 07:39:17 by roticv
Hey stryker, I don't know if you found your posted PatReverse or not but here it is... I went back to the cmax to bitRAKE post and founded it.... do you still plan to modified it.... In your post about XCALL is that smallest version that don't use ADDR the fastest and do you think your PatReverse will be faster than THAT ONE...

See ya

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

ParReverse MACRO ParList:REQ
LOCAL Value, arg
Value TEXTEQU <>
% FOR arg, <ParList>
Value CATSTR <arg>, <,>, Value
ENDM
Value SUBSTR Value, 1, @SizeStr( %Value ) - 1
Value CATSTR <!<>, Value, <!>>
EXITM Value
ENDM

ParCount MACRO ParList:VARARG
LOCAL ParCount
ParCount = 0
FOR Value, <ParList>
ParCount = ParCount + 1
ENDM
EXITM %ParCount
ENDM

callx MACRO Prcdr:REQ, ParList:VARARG
% FOR Value, ParReverse( <ParList> )
push Value
ENDM
; ...... ParCount(ParList) -- in case you want to count the # of parameters
call Prcdr
ENDM
____________________________________

Posted on 2002-07-04 06:46:05 by cmax
I don't need it anymore cmax, I've already found it. I needed it when I was modifying bAZiK`s (xcall version) and Hutch--`s (scall). :alright:
In your post about XCALL is that smallest version that don't use ADDR the fastest and do you think your PatReverse will be faster than THAT ONE...
You mean the second version(stripped down) ?? Yes. In a sense that there s less processing on the macro during the assembling stage.
Posted on 2002-07-04 09:47:42 by stryker