Call()(),CallX()() Command

Purpose

Executes a subroutine at a specified address.

Syntax

Call(addr)([parameters])

CallX(addr)([parameters])

x, addr:iexp
parameters:registers

Description

The Call()() and CallX()() functions call a C or an assembler subroutine at address addr%. Any arguments are passed through the pseudo registers _EAX, _ECX, etc. CallX allows passing segment registers - _DS, _ES, _FS, and _GS - as well.

Example

Debug.Show

Dim a$ = Space$(30)

Call (LabelAddr(xMemClr)) ( _EDI = V:a$, _ECX = 30)

Trace a$

If 0

xMemClr:  . mov al, 67 . rep stosb : . ret

EndIf

Remarks

Call()() and CallX()() don't use the stack. A subroutine should return with a simple ret instruction.

See Also

LC:(), P:(), LP:(), CCall(), LCCall(), PasCall(), LPasCall(), StdCall(), LStdCall()

{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}