Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Artful Two for Clipper 5.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

Syntax

DO_SWAP( [ dos_cmd [, no_kbytes [, _ramdisk ;
         [, cSwapdir[, lOpen_data[, cDIct_name ;
         [, cTmpfile[, lRestdir ]]]]]]] )

Purpose

A wrap-around call to an external memory-swapping function. Clipper's RUN
command is unpredictable at best. A memory swapper writes a specified
amount of RAM to disk, EMS, or XMS, runs a specified program, then restores
memory. This function is written to call Greg Martin's OVERLAY() function.

Arguments

     cDos_cmd -- command to run; Defaults to COMMAND.COM

     nNo_kbytes -- amount of RAM to free; defaults 0 (all)

     cDosprompt -- if passed, DOS prompt to display, otherwise
                       Type EXIT to return...$_$P$G

     cSwapdir -- drive to write temporary file to; defaults to current
                     drive.

     lOpen_data -- if passed, whether to leave all tables open; default
                       .T. If .F., CLOSE DATA is executed before the swap,
                       and CHK_DICT() after.

     cDict_name -- if passed, name of the dictionary file, otherwise if
                       dict_file exists, _dict_name is set to
                       dict_file, otherwise an error message is
                       displayed.

     cTmpfile -- name of temporary file to create. Used only by some
                     versions of OVERLAY().

     lRestdir -- if passed, whether to restore path before returning,
                     else .T. Used only by some versions of OVERLAY().

Setup

You must link in your swapper.

Example

     *Run Microsoft Excel from Clipper, swapping to G:

     DO_SWAP( "EXCEL", 0, "G:" )

Returns

.T.

Side Effects

If the program being called runs out of memory or crashes, all depends on
how it exits.

Artful Calls

DB_OPEN, CHK_DICT, CURDRIV, PUSH/POP_SCR, SCREENFILE

Source File

AA_SWAP.PRG

Notes

We include a demo version of Greg Martin's OVERLAY() on the Artful disks,
because it's useful and reasonably priced. The limit on the demo version is
two swaps per program execution. You'll find an order form in OVERCL33.EXE.
If you use another swapping utility, modify this function accordingly.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson