Excerpted from...
BLUE NOTES -- Magazine of the San Francisco PC Users Group
Editor: Rick Moen, rick@hugin.imat.com (415-543-6475)
Production/design: Sylvia Rippel, syr@hooked.net (415-994-0745)

Article from the July 1995 issue

The Nerd Chart, or Taming the Wild Hardware Resource

by Rick Moen

Considering that you're reading this particular magazine, very likely you are already, like it or not, somebody's computer guru. If you aren't yet, you will be. Even worse, you're probably the only expert available for your own needs.

One typical event that drives this realisation home to people is going out and buying a sound card. You buy it, you plug it into a nice, empty slot, and nothing happens. It doesn't tweet and it doesn't woof, no matter how much software you throw at it. At this point, you could pay some clown in a store to install it for you. Alternatively, you could sit back and just admire your new, four-ounce, phenol-and-silicon paperweight. However, maybe you have a stubborn streak, and start looking for relevant tools. Well, you've come to the right place: This article will provide you with one.

On rare occasions, when dire need has driven you to actually read the documentation for new add-in cards, you've likely emerged guessing that most installation woes arise from board-level squabbles over available IRQ and DMA channels, I/O base addresses, high memory ranges, and maybe SCSI IDs -- five key but troublesome types of hardware resources. Right. However, how do you know what's available, in order to render unto Soundblaster what is Soundblaster's?

You guessed it: That's where the Nerd Chart comes in. Maintain one of these, and you'll always know what settings (hardware resources) are available for new equipment, and will never have mysterious failures because of conflicts over them. Brace yourself; it's not pretty. Here we go:

Interrupts (AKA IRQS = Interrupt Request Channels)

These are the way add-in boards get the central processor unit's (CPU's) attention, when data needs to be picked up and worked on. A given card either needs an IRQ or doesn't, and you want to be able to assign them exclusively,* where needed. Your PC has 16 of them to apportion out, identified as IRQ0 through IRQ15.

The card's manuals should make clear if it needs one, and there will be jumpers or switches to select which one. The trick is to determine which IRQs are unused and preferable (lower IRQ numbers commanding higher processor priority), and which need to be reserved for other, more finicky cards. (Please note that we are talking about the 16 hardware interrupts. There are also software interrupts, but we can ignore them.)

You may well wonder, at this point, "Why should I have to worry about this? Shouldn't these things auto-configure?" Yes, you shouldn't; they should. Unfortunately, 16 IRQs used to feel like plenty -- and while informal agreements on what devices get what IRQs used to be adequate -- the advent of new cards for sound, accelerated video, LAN connectivity, and so on has cramped the field of options, making human oversight increasingly necessary.

16 still seems like a lot, doesn't it? That's because most IRQs are pretty much automatically spoken for. Here's the IRQ part of the chart, with standard assignments:

 0   System timer (NMI)
 1   Keyboard
 2   [cascade to IRQ 9]
 3   COM2 or COM4
 4   COM1 or COM3
 5   LPT2 (if any)
 6   Floppies
 7   LPT1
 8   Clock/calendar
 9   [cascade from IRQ2]
13   math chip (if any)
14   non-SCSI HD (if any)

Crowded, eh? It gets worse. If an eight-bit (IBM XT-compatible) card needs an IRQ, it can come only from the lower half (IRQ0-IRQ7). For example, early Soundblasters in practice needed either IRQ2 or IRQ5. So, as should be apparent from the foregoing, Practical Tip #1 is this: When in doubt, any interrupt-using eight-bit cards should be planned for first, their needs being the least flexible. (As you may have guessed, now-antique XT-class machines, which have only 8-bit slots, lacked IRQs 8 through 15, which arrived with the 286.)

Some further explanations: IRQ0 ("System timer") is your motherboard's "pulse" signal. Because there is no higher-priority (lower-numbered) interrupt, it's sometimes called the "non-maskable interrupt" (NMI), and you may see both terms. IRQ2 -- often used for VGA (and EGA) adapters -- is synonymous with 9 because of an oddity of wiring design (called a "cascade" connection). IRQ13 will be monopolised not only by discrete "8087" math chips, but also by the built-in math-chip sections of 486DXes and Pentiums.

DMA Channels

Our second problem child is the Direct-Memory Address channel, of which your machine has eight (DMA0-DMA7). The idea here is to provide a path for data to move between the add-on device and system RAM, without having to be passed through the CPU chip (thus, "direct to memory").** The good news is that only a few devices need them assigned (e.g., some ethernet cards), and there is only one standard assignment:

0   [cascade to DMA4]
2   Floppies
4   [cascade from DMA0]

Scrawl this DMA column alongside the two IRQ ones on a sheet of paper. Add to it any DMA assignments for additional cards such as some SCSI cards, some ethernet adapters, etc. Surprise! Your Nerd Chart is almost half done.


Most folks will find even better news on this item: Most of you have no SCSI devices at all, and so can disregard the entire matter. If you have them, you almost certainly know it already. SCSI IDs (again) number eight, from 0 to 7. (Some fancy SCSI host adapter cards such as the Adaptec 2742AT have two "channels" providing eight SCSI IDs each, being in essence twin adapters on one card. This is rare.) Each SCSI device must have a unique ID, with the host adapter being #7 and hard drives usually going upwards from ID zero. As with DMA channels, unique assignments are the important thing, shortages being almost unheard of.

If your system uses SCSI devices, create a fourth eight-line column for the ID assignments, as in the following example:

0   HD: Maxtor LXT-535S
4   CD: Toshiba 3401B
7   Adaptec 1542CF

I/O Base Addresses

These are also seldom problematic, which is fortunate, since they're cryptic and frequently misunderstood. When a piece of software sends data to, say, serial port COM1, it does so by stimulating a special set of hardware address wires. Which ones it tickles can be denoted by a three-digit hexadecimal number, for example, 3F8h for COM1. (The "h", which stands for "hex", is sometimes omitted.)

Don't panic: That's just about all you need to know, except that, again, any needed I/O port addresses must be uniquely assigned -- seldom a problem. Some standard assignments follow (some listed ports won't exist in your machine):

3F8h COM1
2F8h COM2
3E8h COM3
2E8h COM4
378h LPT1
278h LPT2
200h Joystick port
3B0h Monochrome monitor
3F0h Floppies

High Memory Addresses

This is the other joker in the deck, almost as congested as the IRQs. Back in the days when everyone thought 640k was a very large number, the PC's designers decreed that, of the 1024k of then-possible system memory addresses, the top 384k would be reserved for any add-in cards with memory on them, such as the RAM and ROM memory on all video cards and hard/floppy controllers. That "adapter memory" would get assigned fixed, immovable system memory addresses. (This was possibly the PC's biggest design error, among many.) Subtracting this "reserved" 384k from the overall 1024k memory map yields the infamous 640k limit on "user" memory
that was designed irrevocably into DOS in 1981.

You'd think that manufacturers could avoid treading on one another's fixed memory locations in the "reserved" ("high") area. Alas, no -- which gives us the last of our quintet of troublemakers.

High memory usage is denoted by a range of five-digit*** hex numbers, each of which is between A0000 (the first byte above 640k) and FFFFF (the topmost byte of the 1024k possible values DOS can cope with). Again, don't panic: You don't have to do hex arithmetic -- though it helps, in order to distinguish up from down, to know that hex digits A through F immediately follow 0 through 9. Some standard assignments follow:

B0000-B1000 Monochrome monitor
A0000-AFFFF VGA graphics RAM
B8000-BFFFF VGA text RAM
C0000-C7FFF VGA video ROM
F0000-FFFFF System ROM

The object is, again, uniqueness -- making sure nothing overlaps. You might find that your new SCSI card wants, by default, to use DC000-DFFFF for its ROM, and so does the ethernet card. One of them will have to be reconfigured to an alternative setting. As with the other resources, some cards will use high memory addresses, and others won't.

A Surprise in Every Package

That brings us to the truly unpalatable part: You have to read the hardware documentation. Ugh. Do it once for each board in your system box (preferably including the motherboard), for the sake of the chart, then you can file it all in that wicker chest with your bell-bottoms and Village People albums, and let it slowly fade from memory.

You should do this because it's the only way you can be sure of getting the full picture. Once, I wrestled with an ATI Graphics Ultra Pro video card for an hour before noticing the manual's obscure note about needing sole control of IRQ2 and I/O port 2E0h (unless set otherwise). With that additional data on record and taken into account, all the system's problems vanished.

Throwing Software at the Problem

An excellent double-check and source of summary information is available in the form of hardware diagnostic software. One such (somewhat) useful tool is provided in recent versions of MS-DOS: MSD.EXE (Microsoft Diagnostics). Once you get past its very clunky user interface, MSD can list for you most IRQ assignments, and the I/O addresses for COM, LPT, and joystick ports. There is also a summary of high memory, but unfortunately a very murky one. Use this program for a quick check, but others are more detailed and more accurate.

Good general-purpose system diagnostics from third parties include AMI Diag, QA Plus, and my old standby, CheckIt (from TouchStone Software). For the casual user, buying any of these may be overkill, but they are useful tools if you do hardware work often. Somewhat disappointingly, though, all have blind spots: Typically, IRQ assignments for ethernet cards and video adapters will not register on them, nor will some DMA settings and most I/O ports. Thus, the previously described, regrettable need to RTFM (Read The Friendly Manual, or words to that effect).

Lastly, one almost uniquely useful (and cheap) tool is Quarterdeck Office Systems's Manifest program, an excellent probe for the entire system memory map, including high memory. Manifest is included with Quarterdeck's similarly top-notch QEMM memory manager, bundled with DesqView, and also available separately. You get a detailed rundown on system memory in highly readable form, plus many other system details. Practical tip #3: Use Manifest's "memory timings" screen along with the main memory display to find the exact boundaries of high memory being used. This can be vital when it's found necessary to exclude memory address ranges that EMM386, Windows, and other programs should be prevented from treading on.

Why It Won't Go Away

In all honesty, the foregoing amounts to a fairly respectable micro-course in PC architecture, and is the sort of thing that drives people to Macintoshes. It should not be necessary. Yet, in my experience, the process described is the long-term-easiest way to ensure that your next add-in card goes in 100%-functional on the first try, and you'll never again be stumped by software demanding to know what I/O port your sound card is on. (I just fold the chart to 2" square, and tape it to the system's back panel, next to the fan -- so I always know where it is.)

Nonetheless, after 13+ years, somebody should have found a better way. So, you may wonder, why on earth are we still tracking IRQ channels and hex memory addresses?

The answer is money. There have been several successful attempts to make PCs auto-configuring (or nearly so): Micro-Channel Architecture, EISA, PCMCIA, and PCI -- and the latest me-too, Microsoft's Plug'N'Play, is promised to be coming along Real Soon Now. Unfortunately, each of these has transformed cheap PC clones into not-so-cheap clones. Further, the temptation is strong to include cheaper generic cards in any backwards-compatible design such as EISA or PCI (who wants to pay for an EISA sound card?), bringing some of the same old headaches along with them. Plug'N'Play aims to introduce the novel headache of a bus that auto-selects hardware resources that it, not you, thinks is sensible, which leads to a whole new category of problems. Thus, I predict that, as long as people prefer cheap PCs, there will be a need for the Nerd Chart. I'm not holding my breath.

The Extra-Credit Question

The Chart's information is condensed enough to leave considerable white space on the single 8 1/2" x 11" sheet required. To any self-respecting compulsive-type, that's a challenge. As the saying goes, "But wait, there's more!" To fill out your record, and impress the heck out of telephone technical support people, jot down the makes and model numbers of all cards, the type and version or date of the system ROM BIOS (e.g., "AMI BIOS 486DX2/66 8 Aug 93"), and the same for your video card, hard disk controller, and sound card. Et voila -- all you could possibly hope for in a system summary, if not more so.

Next month: Quantum Mechanics for Dummies.

* Obligatory concession to nitpickers: Some of the time, with some operating systems, two devices can share an interrupt, e.g., your sound card and printer port LPT2 might share IRQ5. However, avoid this if possible, on general trouble-prevention grounds.

** Practical Tip #2: DMA use may sound undesirable in the sense of using up a system resource, but on balance it's a very good thing, since DMA is much faster than the alternative of funneling data through the CPU (called "programmed I/O" or "PIO"). Cut-rate SCSI and ethernet cards use PIO; all good ones use DMA.

*** The right-most digit is sometimes omitted, as specifying to within a hex "paragraph" of sixteen addresses is good enough. The addresses intended will, nonetheless, be clear from context.

- end -

Copyright (C) 1995 by Rick Moen. All rights reserved. Permission for reproduction in whole or in part is granted to computer user groups for non-profit use.