

                       Sample Frye RS232 Interface Programs        
                                 01/11/02 -med 

        Sample programs have been provided to assist the programmer in 
        getting up to speed as quickly as possible in using the 
        FRYERS drivers to communicate with the Frye Electronics 
        instrumentation.  The various sample programs are actually one 
        program that has been written in the various popular languages 
        found on the PC. 

        The files included in this directory are:
             FSAMPLES.TXT - This documentation file
             FSAMPLES.PAK - Packed archive of source files


        The programs provided are actual working prototypes designed to 
        request a response curve (curve zero) from  the instrument, in 
        this case the Model 6500 or FP40 analyzer, and display the 
        curve on the PC's screen in graphic form. 

        The programs all provide the same information and display. This 
        allows the programmer to see how the  various programming 
        languages interact with the FRYERS driver so that the best tool 
        for the job at hand can be selected.

        If you do not have a graphics display, or the sample program does 
        not work, try using the TEST program instead.  You can find the 
        TEST program in the TEST subdirectory of the RS232 
        distribution disk.

        The source code for the sample programs can be found in the 
        archive file FSAMPLES.PAK. Use the UNPACK program found in the
        INSTALL directory on this disk to extract the source files 
        from the archive file.

        The F-DEMO batch program has been provided to show how to run a 
        sample program. 

        Note: The D3CURVE and BCURVE programs need FRYERS32.DLL to be 
        loaded in the Windows directory, or in the directory where 
        D3CURVE or BCURVE are located. The D3CURVE program can also be 
        compiled with Delphi V2.0 or higher. The BCURVE program can be 
        compiled with any version of C++Builder.













                                        1


        The following files are included in the FSAMPLES.PAK archive:
             PROGRAMS.TXT - Documentation describing operation
             ACURVE.ASM   - Assembler program source
             ACURVE.COM   - Assembler program binary
             F-DEMO.BAT   - Sample Batch file to run sample ACURVE demo
             GWCURVE.BAS  - Microsoft Basic program source
             TBCURVE.BAS  - Turbo Basic program source
             TCCURVE.C    - Turbo C program source
             TP3CURVE.PAS - Turbo Pascal V3 program source
             TP4CURVE.PAS - Turbo Pascal V4+ program source (cga)
             TP6CURVE.PAS - Turbo Pascal V6+ program source (vga)
             TPWCURVE.PAS - Turbo Pascal for Windows source (16bit)
             FRYE.RES     - Resource file for Windows program
             FRYE.ICO     - Frye "F" icon
             BGI256.BGI   - BGI driver for TP6CURVE program
             BGI256.OBJ   - linkable BGI driver for TP6CURVE program
             DOSCRT.PAS   - DOS Crt Emulation Unit for Windows (16bit)
             D1CURVE.DPR  - Delphi1 main program file (16bit)
             D1CURVE.RES  - Delphi1 resource file (16bit)
             DC1FORM.PAS  - Delphi1 form unit (16bit)
             DC1FORM.DFM  - Delphi1 form definition (16bit)
             DC1UNIT.PAS  - Delphi1 code unit (16bit)
             D2CURVE.DPR  - Delphi2+ main program file (32bit)
             D2CURVE.RES  - Delphi2+ resource file  (32bit)
             DC2FORM.PAS  - Delphi2+ form unit  (32bit)
             DC2FORM.DFM  - Delphi2+ form definition  (32bit)
             DC2UNIT.PAS  - Delphi2+ code unit  (32bit)
             FRYEREGS.INC - Fryers interface Pascal record definition
             FRYERSP.PAS  - Pascal Fryers interface unit (32bit) 
             BCURVE.MAK   - C++Builder make file  (32bit)
             BCURVE.CPP   - C++Builder main source file (32bit)
             BCURVE.RES   - C++Builder resource file (32bit)
             BCFORM.CPP   - C++Builder form unit (32bit)
             BCFORM.H     - C++Builder form unit header file  (32bit)
             BCFORM.DFM   - C++Builder form definition  (32bit)
             BCUNIT.CPP   - C++Builder code unit  (32bit)
             BCUNIT.H     - C++Builder code unit header file (32bit)
             FRYERSC.CPP  - C++Builder Fryers interface unit (32bit) 
             FRYERSC.H    - C++Builder Fryers interface header (32bit)
             VBCURVE.MAK  - Visual Basic V4.0 make file (16 and 32 bit)
             VBCFORM.FRM  - Visual Basic V4.0 form definition
             VBCRV1.BAS   - Visual Basic V4.0 source code modual
             FRYEDLLC.CPP - Simplified C++ Fryers dll interface *note
             FRYEDLLC.H   - Header file for fryedllc.h
             FRYEREGS.H   - Fryers Register definition used with C++
             FRYEREGX.H   - Simplified version of fryeregs.h (non-union)










                                        2


        *Note: *NEW* If you are implementing your own C++ program to talk 
        to the fryers32.dll, it is recommended that you use the 
        fryedllc.cpp file as a starting point. It is a newer and cleaner 
        method of connecting to the dll and helps to reduce some of the 
        problems encountered with the method used inside fryersc.cpp. 
        However, you will need to modify the fryersc.cpp file to 
        replace it's dll calling method with the one used by 
        fryedllc.cpp since the fryersc.cpp program has not yet been 
        updated with the new calling method.

        If you are not using the Borland BCB C++ compiler, it is possible 
        that the fryeregs.h file will not compile properly. If this 
        happens, you can use the fryeregx.h file instead. However, you 
        will have to significantly modify the fryersc.cpp file to deal 
        with the non-union interface method. Fryersc.cpp assumes the use 
        of the anonymous structure union to manage the calling registers.


        Requirements:
        The sample programs require an IBM PC or compatible computer with 
        a CGA, EGA, VGA or compatible graphics display.  You will also 
        need a serial port assigned to COM1. While the programs will run 
        without an instrument being connected, a response curve cannot be 
        displayed unless an instrument with the RS232 option is attached 
        to the PC's COM1 port to provide the data.

        To run the sample programs:
        1. Connect the Model 6500, FP40 or FP35 to the PC's COM1 port. 
        2. For MSDOS versions of the programs; From an MSDOS prompt 
            window on the PC, run the FRYERS program on this disk to load 
            the driver into the PC. 
        3. Turn on the 6500, FP40, or FP35 and place it in the coupler 
            mode with a curve on the display. 
        4. Run one of the sample programs such as ACURVE. 
        5. If everything is setup properly you should see a curve 
           being displayed on the PC's screen.
         
        History:   10/19/92 -med  
                   12/17/92 -med
                   10/04/93 -med
                   05/27/97 -med
                   06/22/00 -med
                   01/11/02 -med
        <end>












                                        3
