Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> ca-clipper 5.x</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CA-Clipper 5.x
------------------------------------------------------------------------------
 Blinker supports version 5.01a, 5.2e and 5.3b of CA-Clipper to create DOS
 and DOS extended programs. No other versions are supported, so please obtain
 the appropriate upgrade from Computer Associates before attempting to use
 Blinker with CA-Clipper 5.x.

 The following sample DOS programs written in CA-Clipper 5.x will be used
 throughout this section to illustrate the basics of linking CA-Clipper 5.x
 DOS and DOS extended programs with Blinker.

 CA-Clipper 5.3 Workbench link templates for real mode, dual mode and
 extended mode programs are provided in the CLP\TPL subdirectory of the
 Blinker installation directory, in the files BLIRMD.TPL, BLIDUA.TPL and
 BLIEXT.TPL respectively. Note that incremental linking will default to ON
 when using these templates.

 In addition, Blinker can be used in conjunction with the products
 Clip-4-Win, FiveWin and CLProfiW to create CA-Clipper 5.x Windows programs.
 Please refer to the documentation provided with those products for further
 instructions on using Blinker with them.

 The OBJ subdirectory of the Blinker installation directory includes the file
 MPAR.OBJ which should be linked to all CA-Clipper-for-Windows programs. This
 file fixes a bug in CLIPPER.LIB versions 5.3b and earlier which prevented
 Windows programs from loading when a particular internal table was spread
 across a 32 KB boundary. This could occur in CA-Clipper Windows programs of
 any size, and when it did so, Windows would typically display the helpful
 message 'A device connected to the system is not responding' and terminate
 the program.

 TEST.PRG:
 DO limerick
 QUIT
 LIMERICK.PRG:
 ? "There was an old man from CA"
 RETURN

 The two modules are compiled as follows :

 CLIPPER test -m
 CLIPPER limerick -m

 Throughout this discussion, we use the term `development version' to
 indicate a program which has been linked incrementally, and the term
 `production version' to indicate a program which has been linked with
 incremental linking disabled so has symbol table compression and the
 CA-Clipper paging system enabled.

 The CA-Clipper 5.x compiler inserts the names of all the required CA-Clipper
 libraries within default library search records in all CA-Clipper compiled
 object modules.
 To execute Blinker from the command line :

 BLINKER FILE test, limerick

 This causes Blinker to link the two object modules specified in the FILE
 command (test.obj and limerick.obj) to create an executable program with the
 name TEST.EXE, which is the name of the first object module listed in a FILE
 command. The CA-Clipper libraries are pulled in automatically, assuming that
 the LIB environment variable has been set up to point to the directories
 where they have been installed.

 Blinker defaults to incremental linking for increased development speed. For
 memory efficiency and the final link, you can overlay all CA-Clipper code
 with one additional command:

 BLINKER FILE test, limerick BLINKER INCREMENTAL OFF

 In CA-Clipper5.x, all CA-Clipper code is automatically overlaid using the
 CA-Clipper code paging system when incremental linking is turned off.
 If no BEGINAREA and ENDAREA commands are used with BLINKER EXECUTABLE
 EXTENDED or BLINKER EXECUTABLE DUAL then the CA-Clipper paging system will
 automatically be disabled.

 In the case of DUAL programs this will create a non-overlaid program which
 will not require any overlay files at run time, but will still run in either
 protected or real mode. This is useful for .EXEs such as installation
 programs which must not return to the disk for overlays.

 In the case of EXTENDED programs this may improve program execution speed.
 Protected mode CA-Clipper programs display a call trace when a GPF occurs
 AFTER the main routine has started, ie not during INIT functions. The trace
 is in highest to lowest order so that the last function call is the last one
 displayed.

 The next step is to create a link script file.

 Simple program during development

 The following link script file is equivalent to the first example above:

 TEST.LNK:
 FILE test
 FILE limerick

 Once again, the CA-Clipper libraries will be pulled in automatically,
 providing the LIB environment variable has been set to point to them.
 NOTE: The first file specified must contain the starting (main) CA-Clipper
 program for the application.
 To execute Blinker when using the above sample link script file, use the `@'
 character followed by the script file name (the .LNK extension is assumed).

 BLINKER @test

 Simple program production version

 The following link script file is equivalent to the second example above.

 TEST2.LNK:
 BLINKER INCREMENTAL OFF
 FILE test
 FILE limerick

 To execute Blinker when using the above sample link script file:

 BLINKER @test2

 The next step is to create a link script file to include numerous files,
 libraries, and Blinker link commands.

 Overlaid program production version

 # TESTC5X.LNK:
 # Comments start with a pound/hash sign
 # Disable incremental linking, for the best memory usage
 BLINKER INCREMENTAL OFF
 # Burn in Clipper environment variables
 BLINKER EXECUTABLE CLIPPER F:41
 BLINKER PROCEDURE DEPTH 50    # Set a suitable stack depth
 BLINKER OVERLAY OPSIZE 50     # Set the overlay pool to 50kb
 OUTPUT test.exe               # Output fle name
 BEGINAREA                     # start of overlay area
    FILE test
    FILE limerick
    LIB c:\test\mylib          # Overlay a CA-Clipper code library
    LIB extend                 # Overlay the EXTEND library
 ENDAREA                       # End of overlay area

 The most important of these commands is BLINKER INCREMENTAL OFF. Incremental
 linking is the default setting when linking with CA-Clipper for quick link
 speed.

 It is essential to disable incremental linking before creating the final
 production version. Incremental linking, like linking with debugging
 information, reduces available memory and the execution speed of an
 application and is only intended for development.

 It may also be necessary to turn off incremental linking during development
 if the application runs out of memory.

 DOS extended / non-overlaid program

 # TEST.LNK (This is a comment)
 # Comment out the next line for DOS real mode program
 BLINKER EXECUTABLE EXTENDED   # Create DOS extended program
 BLINKER INCREMENTAL OFF       # For the production version
 FILE test
 FILE limerick
 SEARCH BLXCLPnn               # Blinker dual mode library

 This causes Blinker to link the two object modules specified in the FILE
 commands (test.obj and limerick.obj) to create a DOS extended program with
 the name TEST.EXE, which is the name of the first .OBJ file in a FILE
 command.

 Dual mode / overlaid program

 # TESTDUAL.LNK
 # Comment out the next line for dynamic overlays only
 BLINKER EXECUTABLE DUAL       # Create dual mode program
 BLINKER OVERLAY OPSIZE 50     # 50kb overlay area
 BLINKER OVERLAY PAGEFRAME ON  # Run overlays in EMS page frame
 BLINKER MESSAGE WINK          # Only wink one eye
 BLINKER INCREMENTAL OFF       # For the production version
 FILE test                     # This file is not overlaid
 BEGINAREA                     # Start of overlays
    FILE limerick              # This file is overlaid
 ENDAREA                       # End of overlays
 SEARCH BLXCLPnn               # Blinker dual mode library
 OUTPUT t                      # Output .EXE name
 MAP A,S                       # Create MAP file

 16 bit Windows program

 # TESTWIN.LNK
 BLINKER INCREMENTAL OFF    # For the production version
 FILE test
 FILE limerick
 SEARCH clip4win
 or
 @FIVEWIN
 LIB <all other libraries>
 DEFFILE TEST   # Use TEST.DEF
 ; TEST.DEF
 NAME           TEST
 DESCRIPTION    'A small Windows program'
 ; Please see the Clip-4-Win or FiveWin documentation
 ; for the requirements of the .DEF file.

 Chapter 8 of this manual has an in-depth discussion on using Blinker with
 CA-Clipper.

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