[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|              CALL               |
+---------------------------------+
CALL <file>
        [WITH <expC> | <memvar>]
        [SAVE | NOSAVE]

-----------------------------------
Calls binary routine in memory.
-----------------------------------

The CALL command works in conjunction with the LOAD command. This
command allows you to run customized binary routines directly from
memory.

The LOAD command places the binary file into memory.  The CALL command
executes the loaded binary file.

The WITH option may be used to pass a parameter to the binary
subroutine.  Character strings or memory variables may be passed.  The
memory variables may be of any data type.

It is not necessary to specify an extension on the CALLed file since the
extension is stripped from the file when it is LOADed.  On entry into
the CALLed module, the Code Segment points to the beginning of the
module.  The DS and BX register pair points to the first byte of the
parameter passed using the WITH option.  If no parameter is passed, BX
contains 0.

The CALL and LOAD commands support optional keywords for use with binary
routines that write to the screen.  You may include the keyword SAVE
(NOSAVE being the default) when LOADing a binary routine, or the
keywords SAVE and NOSAVE when CALLing a binary routine placed in memory
with the LOAD command.  If specified with CALL, SAVE and NOSAVE override
the behavior specified with LOAD.

If SAVE is specified, FoxPro copies the current contents of video RAM
into FoxPro's desktop upon return from the binary routine (assuming that
the binary routine will be writing directly into video RAM).

This means that anything written by the binary routine is known to
FoxPro and is treated as if FoxPro had written it.  In particular, such
externally written data will not be erased the first time any FoxPro
object is dragged over it if SAVE is in effect.

Unless it is needed, SAVE is not desirable since it take FoxPro some
time to scan and save the screen contents upon each return from the
binary routine.

WARNING -- Carefully read the following assembly language interface
warnings:

        . When using string variables, do not change the length of the string.
It is possible that our free memory list could be corrupted if the
length of a string variable is changed by even one byte.

        . When saving a string address from one call to the next you should
also reset the string address you will be storing to just prior to using
the string variable.

Clauses
-------

<file>
        File to be called.

WITH <expC> | WITH <memvar>
        Passes parameter to binary subroutine.

SAVE | NOSAVE
        SAVE copies current contents of video RAM into FoxPro's desktop upon
return from binary routine.

-----------------------------------

See Also:  LOAD, RELEASE MODULE

-----------------------------------

See Also: LOAD RELEASE MODULE
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson