


                                 SETPORT Program
                                  04/30/97 -med

        The SETPORT program allows the FRYERS.COM driver (an MSDOS TSR) 
        to be configured for any com port address on the computer using 
        any interrupt available. SETPORT is not used with FRYERS32.DLL. 
        The 32 bit driver uses the Windows API to access the serial port 
        rather than controlling with the hardware directly. 

        Overview:

        The FRYERS.COM driver uses a virtual communications port 
        mechanism. FRYERS.COM has two concurrent ports available for 
        communication (Port1 and Port2). Note that the FRYERS.COM driver 
        uses "port" rather than "COM" as a designation. This is because 
        a FRYERS.COM "port" can be attached to any standard serial "COM" 
        hardware through the use of the SETPORT program. 

        The default configuration for FRYERS.COM when first loaded is to 
        attach Port1 to COM1, and Port2 to COM2. With the use of SETPORT, 
        you can change which COM a port is attached to, or even define a 
        non-standard serial port as long as it uses standard 16450 or 
        8250 uart hardware and interfaces in a fashion similar to the 
        standard serial COM devices. 

        Run the SETPORT program after you load FRYERS.COM, but before you 
        use it. The reconfiguration that SETPORT does can be done 
        entirely inside the application that communicates with FRYERS.COM 
        if so desired. SETPORT uses standard Fryers commands to 
        reconfigure the FRYERS.COM port connections. The SETPORT program 
        is provided as a means to provide the adaptation for programs 
        that do not have the ability to change the FRYERS.COM 
        configuration on their own.


        The 32 bit FRYERS32.DLL driver uses the Windows API to 
        communicate to the serial devices. The SETPORT program will not 
        work with the 32 bit driver, and does not need to. Opening a 
        "port" in 32 bit mode directly opens the associated Windows COM 
        device via the appropriate Windows API call.  


        Note:

        To use SETPORT, the FRYERS.COM driver must be Version 3.07 or 
        higher. The virtual port configuration was not available in 
        versions of Fryers prior to 3.07.










                                        1



        The SETPORT program is given in the following format:

          SETPORT [P:port#] [C:com# or U:uartaddr] [I:irq#]

        The program expects three parameters (which can be given in any 
        order). P, C or U, and I. Either the "C" or the "U" parameter can 
        be given, but not both. If both are given, the last one in the 
        command will be the one that takes effect.

        P - FRYERS Port:

        The first parameter (P) specifies the FRYERS port that will be 
        modified. This can be either "1" or "2" If this parameter
        is not provided, port "1" is presumed to be the one to be 
        modified.

        C - Computer Serial Port:

        The next parameter (C) specifies the computer serial port to be 
        attached to the FRYERS port. The normal defaults for the FRYERS 
        ports are 1:1 and 2:2. The C parameter can be 1, 2, 3, or 4 which 
        matches one of the four possible PC serial COM ports. Normally 
        COM port 1 or 3 is attached to FRYERS port 1, and COM port 2 or 4 
        is attached to FRYERS port 2.

        U - Uart base address:

        The SETPORT program allows the FRYERS driver to be adapted for 
        custom serial ports by allowing the port base address to be 
        specified. The port uart must be a 16450 type of uart for this to 
        work. This parameter is used in place of the "C" parameter to 
        specify a custom serial port. To reference the uart address as
        a hex number, precede the hex number with a dollar sign ($2E8).

        I - Interrupt number:

        The FRYERS driver requires that the serial port operate with an 
        interrupt. When a port is selected with the "C" parameter, the 
        default Interrupt (IRQ) is selected for that COM port. The 
        default interrupt can be overridden with the "I" parameter to use 
        any of the available interrupts in the computer. 

        Example:

        To set the FRYERS port #1 to the PC com port #3 using IRQ 7, you 
        would enter the following command:
          
          SETPORT P:1 C:3 I:7









                                        2



        Notes: 

        Not all interrupts on the PC can be used since some are reserved 
        for internal use in the PC. Also, you are not allowed to have two 
        devices running with the same interrupt. The SETPORT program will 
        test for interrupt conflicts when it is run and notify you if it 
        finds a conflict. This is not 100% fool proof, but will work most 
        of the time. Ideally, you should be aware of the configuration of 
        your computer and not use an interrupt that might conflict with 
        other hardware in the computer.


        Defaults:

        Fryers configuration when loaded:

            Fryers    Computer    Interrupt  
            Port 1     COM 1        IRQ 4
            Port 2     COM 2        IRQ 3


        Example configurations available with the SETPORT program:

            Fryers    Computer    Interrupt     Command
            Port 1     COM 3        IRQ 4     SETPORT P:1 C:3
            Port 2     COM 4        IRQ 3     SETPORT P:2 C:4
            Port 1     COM 3        IRQ 5     SETPORT P:1 C:4 I:5 
            Port 2     COM 4        IRQ 7     SETPORT P:1 U:$3E8 I:7 

        Standard Uart Addresses:

            COM1 = $3F8   COM2 = $2F8    COM3 = $3E8    COM4 = $2E8



        History: 03/18/93 -med original
                 04/30/97 -med revised documentation 
        <eof>



















                                        3
