Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>com_setirq()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 COM_SETIRQ()
 Changes the interrupt request for a port
------------------------------------------------------------------------------
 Syntax

     COM_SETIRQ(<nComPort>,<nIRQ|cIRQ>) --> lChanged

 Arguments

     <nComPort>  Designates the port (1 to 4) where the interrupt request
     (IRQ) is set.

     <nIRQ|cIRQ>  Designates the new IRQ number for the selected port.
     This parameter can be a decimal or a hexadecimal string and can be from
     2 to 15.

 Returns

     The function returns .T. when the new IRQ has been successfully set.

 Description

     Unfortunately, there is not a binding standard for serial ports,
     particularly for COM3 and COM4.

     Each interface card uses an interrupt request line to advise the
     interrupt controller that a character has been received.  The controller
     then passes this information on to the CPU, which calls a service
     routine through the corresponding interrupt vector.  XT systems have
     eight such interrupt lines available.  AT systems have more than 16
     available interrupt lines, some of which are usually occupied with other
     peripherals.  The allocation of a new IRQ is no small matter and
     requires considerable technical expertise.  Determining which IRQ is
     available and is not currently in use can usually be done by studying
     the configuration of all external devices and the technical
     documentation that accompanies your computer system.  Typically IRQ's 0
     and 1 are used for internal purposes (timer), 2 and 9 for network
     adapters, 5 and 7 for the printer, and 6 and 14 for floppies or hard
     disks.

     Tip:  As you will notice from the default setting in the
     Introduction to this chapter, it is possible for multiple ports to use
     the same IRQ (interrupt sharing).  While CA-Clipper Tools functions do
     support this process, standard port hardware usually does not.  However,
     special multiple port cards for this purpose are offered by a variety of
     manufacturers.

 Notes

     .  Please notice that the base settings that CA-Clipper Tools
        uses for COM1 to COM4 are described in the Introduction to this
        chapter.

     .  COM_SETIRQ() does not test to see if a port is actually
        serving the selected IRQ.

 Examples

     .  Set COM3 and COM4 to IRQ 5.  This example requires two calls:

        ? COM_SETIRQ(3, 5)            // .T.
        ? COM_SETIRQ(4, 5)            // .T.

     .  Set port 4 to IRQ 10. IRQ in hex:

        ? COM_SETIRQ(4, "A")          // .T.

     .  This is an example of an incorrect value for IRQ:

        ? COM_SETIRQ(2, 0)            // Timer tick not allowed  .F.
        ? COM_SETIRQ(3, "10")         // This would be decimal 16  .F.


See Also: COM_SETIO() COM_GETIRQ() COM_GETIO()

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