CALL Extended CALL Extension
CALL expression [language] [,arg_list]
Calls high-level procedure. Always list arguments in arg_list in the
same order they were listed in the procedure header.
Example: CALL atest PASCAL,ax,es OFFSET buffer,[blen]
; assembles to:
push ax
push es offset buffer ; push es; push offset buffer
push [word ptr blen]
CALL atest ; Procedure cleans up stack
Example: CALL btest C,ax,es OFFSET buffer,[blen]
; assembles to:
push [word ptr blen]
push es offset buffer
push ax
CALL btest
add sp,8
Procedures that define some of their arguments with the RETURNS
keyword (see ARG) must be considered specially. These arguments are
used to return values to the caller; therefore, the caller always
pops them. There is no special extension to the CALL instruction in
Turbo Assembler to help pass those arguments; if you make a call -
from an assembler program - to a procedure declaring arguments with
RETURNS, you must explicitly PUSH these arguments before the CALL,
and POP them afterward.
If the interfacing convention for the call is NOLANGUAGE, Turbo
Assembler reports an error if any arguments are present. Although you
can define arguments to a NOLANGUAGE procedure with the ARG directive,
you must explicitly push the arguments when you make a call to a
NOLANGUAGE procedure (or use a language override).
Note:
In Ideal mode, when calling a procedure that has been PROCDESCed or
PROCTYPEd, you must use a procedure override (proc appears as struc
data type in the symbol listing !?), e.g.
call PROC PTR protob_proc, arg1, arg2
CALL instance_ptr METHOD [object_name:] method_name
[USES [segreg:]offsreg] [language_and_args]
Calls a method procedure.