home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / info / faq / os2_20 / os2help / intrpt.fax < prev    next >
Encoding:
Text File  |  1993-06-21  |  13.6 KB  |  267 lines

  1. ┌───────────────────────────────────────────────────────────────────────────┐
  2. │                          OS/2 2.0 Technical Tips                          │
  3. │                                 From the                                  │
  4. │                        OS/2 Technical Support Team                        │
  5. │                            Boca Raton, Florida                            │
  6. │                                                                           │
  7. ├───────────────────┬─────────────────────────────────────┬─────────────────┤
  8. │    File Name      │   Description                       │ Number of pages │
  9. ├───────────────────┼─────────────────────────────────────┼─────────────────┤
  10. │  INTERUPT.FAX     │ OS/2 Interrupt Level Information    │        5        │
  11. └───────────────────┴─────────────────────────────────────┴─────────────────┘
  12.  
  13. INFORMATION REGARDING INTERRUPTS AND OS/2 2.0
  14. ---------------------------------------------
  15.  
  16.   ISA MACHINES(AT BUS)
  17.  
  18.   On an ISA system, having a shared interrupt-request line can cause problems.
  19.   ISA systems have what are called "edge triggered" interrupts whereas Micro
  20.   Channel and EISA systems use "level sensitive" interrupts.  "Edge triggered"
  21.   interrupts can only be sensed for a very short period of time.  If a second
  22.   interrupt arrives from another adapter while the first interrupt is still
  23.   being processed, the second interrupt will be lost.  In your computer system,
  24.   this situation can lead to various difficulties such as printers that do not
  25.   seem to print smoothly or reliably, or communications sessions where some
  26.   characters are getting lost.
  27.  
  28.   However, with single-tasking systems such as DOS, the two adapters that are
  29.   sharing the interrupt might never cause any real problems because they might
  30.   never be in use at the same time.  OS/2 2.0, however, presents a different
  31.   set of problems.  If you have multiple serial communications adapters, there
  32.   is a greater probability that you might try to use two or more of them at the
  33.   same time.  If some of them have previously been set up using shared
  34.   interrupts, problems can occur that probably didn't happen in DOS.
  35.  
  36.   OS/2 2.0 can detect that an interrupt line is shared and will not allow
  37.   simultaneous use.  Assume that COM1 and COM3 are sharing Interrupt Request
  38.   line 4 (IRQ4).  If you try to use both COM ports at the same time, the OS/2
  39.   operating system will not allow the second one to start.  A well-written OS/2
  40.   communications program will recognize that the port cannot be opened and an
  41.   error message will be displayed.  A DOS application, however, is unprepared
  42.   to respond to this unfamiliar situation.  It will probably suspend, waiting
  43.   for the port that will not open.
  44.  
  45.   Another potential source of trouble is having multiple hardware adapters that
  46.   are sharing the same I/O address.  The various hardware adapters in your
  47.   computer must have their own addresses.  Consider what might happen, for
  48.   example, if the commands that were meant for your printer were instead routed
  49.   to your disk drive.
  50.  
  51.   The solution for all of these problems is to ensure that all your hardware
  52.   adapters have their own unique I/O addresses and IRQ assignments.
  53.  
  54.  
  55.   COM3 OR COM4 SUPPORT ON AN ISA SYSTEM
  56.  
  57.   The original ISA machine (the IBM PC-AT) allowed for the definition of up to
  58.   four serial communication ports.  However, there has never been any hardware
  59.   architectural standard that defined the I/O port addresses or Interrupt
  60.   Request (IRQ) lines associated with communication ports 3 or 4.
  61.  
  62.   Over the years, a convention has developed that places the port addresses for
  63.   COM3 and COM4 at 03E8 and 02E8 respectively.  This is a generally accepted
  64.   convention, but not a standard.  Check the documentation and the settings of
  65.   the adapters in your system to verify your hardware environment.
  66.  
  67.   After you have checked and set the I/O and IRQ values on your COM ports or
  68.   internal modems, you must add this information to the communications
  69.   device-driver (COM.SYS) statement in the CONFIG.SYS file.
  70.  
  71.   You might also need to tell your communications application software where
  72.   the COM ports are.  ProComm software, for example, has a configuration screen
  73.   that enables you to specify these settings.  If the application, operating
  74.   system, and hardware are not in agreement, then the application will not run.
  75.  
  76.   OS/2 COM ports do not need to be defined in sequence.  It is acceptable to
  77.   have a COM4 without having a COM3.  DOS, however, might have difficulty if
  78.   there is a gap in the port definition.  To avoid confusion for DOS, you can
  79.   define COM ports that do not have any physical adapters attached in the
  80.   COM.SYS statement.  These substitute definitions will serve as placeholders.
  81.   COM1 and COM2 are assumed to have standard values and do not need to be
  82.   explicitly set up unless you want to set some non-standard values to
  83.   accommodate your particular configuration.
  84.  
  85.   To enable COM3 or COM4 on an ISA system, place the following in the
  86.   CONFIG.SYS file:
  87.  
  88.     DEVICE=X:\OS2\COM.SYS (n,a,i) (n,a,i)
  89.  
  90.   where
  91.  
  92.    X = the drive where OS/2 is installed
  93.    n = the COM port that you are attempting to access
  94.    a = communications port I/O address (03E8, 02E8, for example)
  95.    i = IRQ level, which is usually a jumper setting on the I/O adapter
  96.  
  97.   For example, to specify that COM3 is at address 03E8 on IRQ5 and that COM4 is
  98.   at address 02E8 on IRQ10, use the following statement (assuming that OS/2 is
  99.   installed on drive C):
  100.  
  101.           DEVICE=C:\OS2\COM.SYS (3,03E8,5) (4,02E8,10)
  102.  
  103.   The I/O address and IRQ level should be noted in the documentation that came
  104.   with your adapter.  Either or both might be fixed values or can be set to a
  105.   range of values via jumpers or switches.  In some cases you might find that
  106.   the values are fixed or that the range of settings available to you is
  107.   insufficient to avoid the sharing conflict.  In that case, you must purchase
  108.   a different, more versatile adapter or accept that you cannot use both
  109.   adapters at the same time.
  110.  
  111.  
  112.   SETTING THE INTERRUPT REQUEST (IRQ) LEVEL ON AN ISA SYSTEM
  113.  
  114.   The following information will help you determine what IRQ settings you can
  115.   use for COM3 or COM4 port adapters to avoid shared interrupts.
  116.  
  117.   On an ISA machine there are a total of 15 IRQ levels available.  Many of
  118.   these are already being used.  Most are already in use because they are the
  119.   the standard settings for the more common devices.  These standard settings
  120.   are as follows:
  121.  
  122.   IRQ LEVEL      DEVICE ASSOCIATED
  123.  
  124.   0              System Timer
  125.   1              Keyboard
  126.   2              Secondary Interrupt Controller  (see note)
  127.   3              COM2 (Serial Communications Port 2)
  128.   4              COM1 (Serial Communications Port 1)
  129.   5              LPT2 (Parallel Port 2)
  130.   6              Diskette
  131.   7              LPT1 (Parallel Port 1)
  132.   8              Realtime Clock
  133.   9              open
  134.   10             open
  135.   11             open
  136.   12             open
  137.   13             Math Coprocessor
  138.   14             Hard Disk
  139.   15             open
  140.  
  141.   NOTE:  On the IBM-AT (ISA bus), the IRQ9 pin is identical with the IRQ2 pin
  142.          on the original IBM-PC.  If you have an older, 8-bit adapter whose
  143.          documentation states that it uses IRQ2, be aware that this will
  144.          actually be interpreted as IRQ9 when plugged into the 16-bit ISA bus.
  145.  
  146.   The IRQ levels shown as "open" have no established, standardized use.  When
  147.   setting the IRQ values on your COM3 or COM4 ports, you are likely to find
  148.   these levels available to use without conflict with some other adapter.
  149.   Furthermore, if you don't have two parallel ports installed, IRQ5 might be
  150.   usable for some other purpose, such as COM3 or COM4.  Be cautious about doing
  151.   this because it might cause a problem later if you decide to install a second
  152.   parallel port.  In addition, some other non-standard device might already be
  153.   using IRQ5.
  154.  
  155.   When trying to manage the IRQ levels of your various hardware adapters to
  156.   avoid conflicts, you may find that your 8-bit adapters cause problems.
  157.   Except for IRQ9, only 16-bit adapters are configurable to use IRQ levels
  158.   higher than 7.  A glance at the IRQ table will also show that the
  159.   low-numbered IRQ lines already have some standard function assigned.  It
  160.  
  161.   might be that your only alternative for avoiding some IRQ conflicts is to
  162.   purchase a more versatile 16-bit adapter.
  163.  
  164.   If you have non-standard 8-bit adapters, be especially careful of interrupt
  165.   conflicts.  For example, the SoundBlaster adapter is configured at the
  166.   factory to use IRQ7.  IRQ7, however, is the standard assignment for LPT1, the
  167.   first printer port.  This conflict might not be apparent with DOS because DOS
  168.   printing typically does not use the interrupt line.  OS/2 2.0, however,
  169.   requires it, and the hidden conflict can become the source of printing
  170.   problems.  It is also fairly common to discover that the interrupt feature on
  171.   your parallel port adapter does not work.  In DOS, this might not have any
  172.   effect.  In OS/2 2.0, however, your printer might be very erratic or not work
  173.   at all.
  174.  
  175.   Under OS/2 interrupts can not be shared.  Results are unpredictable if
  176.   interrupts are shared.  Sharing interrupts is not a problem under DOS.  It is
  177.   possible for devices that are sharing interrupts to work perfectly under DOS
  178.   and have problems under OS/2.
  179.  
  180.   (Note:  On the IBM-AT (ISA bus) the IRQ9 pin is identical with the IRQ22 pin
  181.   on the original IBM-PC.  If you have an older, 8-bit adapter whose
  182.   documentation states that it uses IRQ2 then be aware that this will actually
  183.   be seen as IRQ9 when plugged into the 16-bit ISA bus.)
  184.  
  185.   If multiple hardware adapters of any kind (not just communications) are using
  186.   the same IRQ level then the effect on your computer will be unpredictable.
  187.   However, with single tasking systems like DOS, the two adapters which are
  188.   sharing the interrupt may never cause any problems since they may never be in
  189.   use at the same time.
  190.  
  191.   OS/2, however, presents a different set of problems.  If we have two, three
  192.   or four adapters, the probability is now high that they are used at the same
  193.   time.  If some of adapters had been set up using shared interrupts then the
  194.   scene is set for mysterious things to occur in OS/2.
  195.  
  196.   OS/2 can, however, detect that an interrupt line is shared and will disallow
  197.   the simultaneous use.  Assume that COM1 and COM3 were sharing IRQ4 (a fairly
  198.   common real situation).  If we tried to use both COM ports at the same time
  199.   OS/2 would refuse to allow the second one to start.  A well written OS/2
  200.   communications program would see and report the error from OS/2 that the port
  201.   could not be opened.  A DOS application, however, will likely be unprepared
  202.   to respond to this strange situation and it may simply hang there waiting
  203.   forever for the port that will never open.
  204.  
  205.   The solution for all of this is to make sure that all of your hardware
  206.   adapters have their own unique I/O addresses and IRQ assignments.
  207.   Unfortunately, on an ISA machine, OS/2 has no way to query the computer to
  208.   find out what these settings are.  Therefore, after checking and setting the
  209.   adapters according to the instruction manuals you must also tell OS/2 what
  210.   you've done by placing explicit information into the CONFIG.SYS file.
  211.  
  212. SUMMARY
  213. -------
  214.  
  215.         *  Even though there is some flexibility for Printer &
  216.            Comm. port assignment try to stick to the standard
  217.            assignment as shown in IRQ table at the beginning
  218.            of document.
  219.  
  220.         *  Available interrupts, in order of priority, are:
  221.            IRQ10, IRQ11, IRQ12, IRQ15, IRQ3 (if not used
  222.            for COM2), and IRQ5 (if not used for LPT2).
  223.  
  224.         *  Addresses and interrupts can be assigned in OS2
  225.            to comm ports as described in info apar II06069.
  226.            Standard assigment is as follows:
  227.                 COM1 - 3F8 - IRQ 4 (default)
  228.                 COM2 - 2F8 - IRQ 3 (default)
  229.                 COM3 - 3E8
  230.                 COM4 - 2E8
  231.            There is no OS/2 default setting for COM3 and
  232.            COM4. It must be specified by the device=com.sys
  233.            statement in config.sys.
  234.  
  235.         *  Printer port addresses and IRQ levels are hardcoded
  236.            in OS/2 as follows:
  237.                 3BC and 378     ==> IRQ7 (LPT1)
  238.                 278             ==> IRQ5 (LPT2)
  239.            Unlike the the comm ports, where the addresses
  240.            and the interrupts can be modified by the
  241.            device=com.sys in config.sys, the printer port
  242.            addresses and IRQ shown above are fixed.
  243.            OS2 assigns LPT1 to the highest printer port address
  244.            being used. The printer address is specified in the
  245.            printer adapter board.
  246.            With OS/2 you can not use both addresses 3BC and 378
  247.            as printer port addresses. Both LPTs would be sharing
  248.            IRQ7.
  249.            Unlike DOS, OS/2 uses interrupts for printing.
  250.            The interrupt is triggered by a signal line from
  251.            the printer, ACK. If the IRQs are not configured
  252.            correctly, or the printer cable is missing the ACK
  253.            line the printer may work under DOS and
  254.            have problems under OS/2.
  255.  
  256.            An example of address and interrupt assignment is
  257.            follows:
  258.                    COM1 - 3F8,IRQ4
  259.                    COM2 - 2F8,IRQ3
  260.                    COM3 - 3E8,IRQ5 (IRQ5 not being used by lpt2)
  261.                    COM4 - 2E8,IRQ10
  262.  
  263.                    LPT1 - 378,IRQ7
  264.  
  265.         *  If interrupt devices are occasionally losing data,
  266.            try moving to a higher priority unused interrupt.
  267.