Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OVERCL.ZIP
Filename : TEST.PRG

 
Output of file : TEST.PRG contained in archive : OVERCL.ZIP
*******************************************************************************
*
* TEST.PRG
*
* Program To Test The OverLay() Function
*
* This test program and OverLay() .OBJ file(s)
* Copyright (c) 1988-89
* by GAMbit Software
* Gregory A. Martin
*
* None of this source code may be used in demos for other products.
* (I know this statement sounds unusual, but I did have a competitor use
* a previous demo I had created (he changed a few words) for a previous
* product to demo his own competing product.)
*
* Please feel free to upload this demo and associated documentation
* to other BBSs or to give it to other Clipper developers.
*
*******************************************************************************

* Turn off Clipper's scoreboard display on line 0.
SET SCOREBOARD OFF

DO ClearScreen
@ 05, 03 SAY "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
@ 06, 03 SAY "º OverLay() gives Clipper programmers the ability to run LARGE programs º"
@ 07, 03 SAY "º from their Clipper applications. OverLay() saves memory used by your º"
@ 08, 03 SAY "º Clipper program to a disk file, frees that memory for reuse, and then º"
@ 09, 03 SAY "º RUNs whatever program you have requested or even shells to DOS. With º"
@ 10, 03 SAY "º OverLay() you can free up all but about 10K of your memory for use by º"
@ 11, 03 SAY "º another program! º"
@ 12, 03 SAY "º º"
@ 13, 03 SAY "º Run this test program to get a feel for how OverLay() works. º"
@ 14, 03 SAY "º º"
@ 15, 03 SAY "º To really appreciate what OverLay() can do for you, read through the º"
@ 16, 03 SAY "º documentation and link OverLay() into your own applications. º"
@ 17, 03 SAY "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
DO PressAKey

Result = 0
Program = SPACE(30) && The program can be up to 124 characters.
Memory = 0 && 0 means to free up ALL possible memory.
Prompt = SPACE(60) && The prompt is limited to 60 characters.
Pathname = SPACE(30) && Defaults to the current drive:directory.
Filename = SPACE(12) && This parameter rarely needs to be used.
RestoreDir = .t. && .t. will restore the drive/directory.
DO WHILE .t.
DO ClearScreen
@ 00, 05 SAY "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
@ 01, 05 SAY "º OverLay() Test Program º"
@ 02, 05 SAY "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹"
@ 03, 05 SAY "º Return Value Of Last Test: º"
@ 04, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 05, 05 SAY "º Name Of Program To Run: º"
@ 06, 05 SAY "º (Blank To Shell To DOS) º"
@ 07, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 08, 05 SAY "º Amount Of Memory Required: º"
@ 09, 05 SAY "º (0 To Free All Available) º"
@ 10, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 11, 05 SAY "º New DOS Prompt String: º"
@ 12, 05 SAY "º (Blank For Current String) Use: Type EXIT to return$_$P$G º"
@ 13, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 14, 05 SAY "º Pathname To Store Temporary File: º"
@ 15, 05 SAY "º (Blank For Current Directory) º"
@ 16, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 17, 05 SAY "º Filename To Save Memory To: º"
@ 18, 05 SAY "º (Blank For Temporary File) º"
@ 19, 05 SAY "ÇÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄĶ"
@ 20, 05 SAY "º Restore The Drive/Directory: º"
@ 21, 05 SAY "ÌÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͹"
@ 22, 05 SAY "º Press Escape To Exit º"
@ 23, 05 SAY "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
@ 03, 42 SAY Result PICTURE "@B"
@ 05, 42 GET Program PICTURE "@!"
@ 08, 42 GET Memory PICTURE "999"
@ 11, 42 GET Prompt PICTURE "@S30"
@ 14, 42 GET Pathname PICTURE "@!"
@ 17, 42 GET Filename PICTURE "@!"
@ 20, 42 GET RestoreDir PICTURE "Y"
READ
IF LASTKEY() = 27
EXIT
ENDIF

*****************************************************************************
*
* The SaveInts() and RestInts() functions are used here ONLY for an example.
* Interrupts 230 and 232 are not in any way special. They are saved before
* the call to OverLay() and restored after the call just to show you how to
* use the functions.
*
Source = CHR(230) + CHR(232) && Use CHR() to store numbers in a string.
Dest = SaveInts(Source) && Current interrupt vectors are now saved.
*
*****************************************************************************

DO ClearScreen

* Now to make that magical call to OverLay() (Drum roll please...)
*
Result = OverLay(LTRIM(TRIM(Program)), Memory, LTRIM(TRIM(Prompt)),;
LTRIM(TRIM(Pathname)), LTRIM(TRIM(Filename)), RestoreDir)
*
* Back in program!

*****************************************************************************
*
* This function restores interrupts 230 and 232
* Again, there is nothing special about these interrupts. In fact, the vast
* majority of Clipper applications won't need to use SaveInts and RestInts.
* The rule is: If you don't understand what they do - DON'T use them.
*
RestInts(Dest)
*
****************************************************************************

DO PressAKey
ENDDO

DO ClearScreen
@ 07, 24 SAY "ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»"
@ 08, 24 SAY "º º"
@ 09, 24 SAY "º To order contact: º"
@ 10, 24 SAY "º º"
@ 11, 24 SAY "º Market Service Associates º"
@ 12, 24 SAY "º PO Box 986 º"
@ 13, 24 SAY "º Coeur d'Alene, ID. 83814 º"
@ 14, 24 SAY "º (208) 765-9439 º"
@ 15, 24 SAY "º º"
@ 16, 24 SAY "ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ"
@ 23, 00 SAY ""
RETURN


*********************
PROCEDURE ClearScreen
*********************
IF ISCOLOR()
SET COLOR TO W/N
CLEAR SCREEN
SET COLOR TO W/B, B/W
ELSE
SET COLOR TO W/N
CLEAR SCREEN
SET COLOR TO W/N, N/W
ENDIF
RETURN


*********************
PROCEDURE PressAKey
*********************
IF ISCOLOR()
SET COLOR TO B/W
ELSE
SET COLOR TO N/W
ENDIF
@ 24, 00
@ 24, 28 SAY "Press Any Key To Continue"
SET CURSOR OFF
INKEY(0)
SET CURSOR ON
RETURN



  3 Responses to “Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : OVERCL.ZIP
Filename : TEST.PRG

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/