[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|              LOAD               |
+---------------------------------+
LOAD <file> [SAVE] [NOSAVE]

-----------------------------------
Loads binary file into memory.
-----------------------------------

The LOAD command loads binary routines from disk into memory.  Sixteen
files (up to 64K each) may be loaded into memory at one time.

The default extension is .BIN for a binary routine.  When you CALL a
binary routine, the extension should be omitted.  If the LOADed <file>
has the same file name and a different extension than one previously
LOADed, the new <file> overwrites the previously LOADed <file>.

The LOAD and CALL 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.

The following steps should be followed when creating a binary <file>:

        MASM <file> -- assemble the program file and create an object file.

        LINK <file> -- link the object file and create an executable file.

        EXE2BIN <file> -- create a binary file.

In addition, follow these rules when creating a FoxPro binary file:

        . The first executable instruction must originate at an offset of 0.

        . The binary program must not change the length of memory variables
passed as arguments.

        . The amount of memory used or allocated may not exceed the actual
program size because the file size is used to determine the total amount
of memory needing allocation.

        . The SS and CS registers must be restored before control is returned
to FoxPro.

        . A far return should be used to return control to FoxPro when the
program is executed with a LOAD and a CALL.

        . When a program is terminated by an exit system call rather than a far
return, it is necessary to execute assembly programs with the RUN | !
command.

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 the 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 loaded into memory.

SAVE
        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.

NOSAVE
        Default setting.

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

See Also:  CALL, RELEASE MODULE

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

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