Home > Articles > Certification > CompTIA

  • Print
  • + Share This
This chapter is from the book

Extended I/O

In addition to the millions of possible memory locations in a PC, typically thousands of addresses are set aside for input and output devices in a system. In order for any device to operate with the system's microprocessor, it must have an address (or group of addresses) where the system can find it.

When discussing the standard I/O ports for PCs, it is common to differentiate between traditional standard ports that include

  • Keyboard port

  • Centronic parallel ports

  • RS-232C serial ports

  • Game ports

And newer standard ports that include

  • PS/2 mouse and keyboard ports

  • USB ports

  • IEEE-1394 Firewire ports

  • Infrared ports

  • Improved parallel ports

Moving Data

The most frequent operation performed in a computer is the movement of information from one location to another. This information is moved in the form of words. Basically, there are two modes in which the words can be transferred. These modes are parallel mode—where an entire word is transferred from location A to location B by a set of parallel conductors at one instant—and serial mode—where the bits of the word are transmitted along a single conductor, one bit at a time.


Interface circuits Interface circuits are necessary because the characteristics of most peripherals differ greatly from those of the basic computer. Most interface circuits in the PC-compatible world have been integrated into application-specific ICs.

Serial transfers require more time to accomplish than parallel transfers because a clock cycle must be used for each bit transferred. A parallel transfer requires only one clock pulse. Examples of both parallel and serial transfers are depicted in Figure 3.1.

Figure 3.1 Parallel and serial data transfers.

Initiating I/O Transfers

During normal program execution, the microprocessor constantly reads from or writes to memory locations. The program can also call on the microprocessor to read from or write to one of the system's I/O devices. Regardless of how the peripheral is connected to the system (serial or parallel), one of four methods can be used to initiate data transfer between the system and the peripheral. These four methods are listed as follows:

  • Polling—The microprocessor examines the status of the peripheral under program control.

  • Programmed I/O—The microprocessor alerts the designated peripheral by applying its address to the system's address bus.

  • Interrupt-driven I/O—The peripheral alerts the microprocessor that it's ready to transfer data.

  • Direct Memory Access (DMA)—The intelligent peripheral assumes control of the system's buses to conduct direct transfers with primary memory.

Polling and Programmed I/O

Both polling and programmed I/O represent software approaches to data transfer; interrupt-driven and DMA transfers, on the other hand, are basically hardware approaches. Using the polling method, the software periodically checks with the system's I/O devices to determine whether any device is ready to conduct a data transfer. The programmed I/O method calls for the microprocessor to alert the desired peripheral of an I/O operation by issuing its address to the address bus. The peripheral can delay the transfer by asserting its busy line.


Reference Shelf For more information, refer to the Electronic Reference Shelf, "Initiating I/O Transfers," located on the CD that accompanies this book.


In the course of normal operations, the various I/O devices attached to a PC, such as the keyboard and disk drives, require servicing from the system's microprocessor. Because these service requests can happen at any time and tend to require immediate attention, I/O devices generally have the capability to interrupt the microprocessor while it is executing a program. The I/O device accomplishes this by issuing a Maskable Interrupt (IRQ) input signal to the microprocessor. Each device in a PC-compatible system that is capable of interrupting the microprocessor must be assigned its own, unique IRQ number. The system uses this number to identify which device is in need of service.


You should know that a device that requires service from the microprocessor must have access to its own IRQ channel.

Two varieties of interrupts are used in microcomputers:

  • Maskable Interrupts (IRQs)—Interrupts that the system microprocessor can ignore under certain conditions.

  • Non-Maskable Interrupts (NMI)—Very serious interrupts to which the system microprocessor must always respond. NMI conditions normally result in the system being shut down.

The device that requires service contacts the system's interrupt controller, which in turn contacts the system microprocessor and supplies it with information about where to service the device that issued the request. The processor stops what it is doing, stores the information that it is working with, jumps to the program servicing that interrupt, runs the service routine, and then returns to its original operation. A programmable interrupt controller, and its relationship to the system's microprocessor, is illustrated in Figure 3.2.

Figure 3.2 A programmable interrupt controller operation.

Of the 16 interrupt channels (IRQ0 through IRQ15) available, three are generally used inside the system board's chipset. Therefore, they do not have external IRQ pins. The other 13 IRQ inputs are available to the system for user-definable interrupt functions. Each IRQ input is assigned a priority level. IRQ0 is the highest, and IRQ15 is the lowest. The internally connected channels are

Channel 0 (IRQ0)—Timer/Counter interrupt is OK
Channel 1 (IRQ1)—Keyboard buffer full
Channel 2 (IRQ2)—Cascaded to INTC2
Channel 8 (IRQ8)—Real-Time Clock interrupt
Channel 9 (IRQ9)—Cascade between INTC1 and INTC2
Channel 13 (IRQ13)—Math Coprocessor interrupt

Table 3.1 shows the designations for the various interrupt levels in the system.

Table 3.1 System Interrupt Levels













































Exam Tip

Memorize the system resources available in an ISA-compatible system and what their typical assignments are. There will be several questions about standard IRQ assignments on the exam.

Challenge #1

One of your co-workers is adding a wide carriage dot matrix printer to his workstation so that he can print multipart forms. He already has a color ink-jet printer attached to the computer using IRQ7. He has no idea of which resources to assign to the new printer. What will you tell him when he asks for help?

Exam Tip

Know what types of problems can cause an NMI to occur.

There are two serious system board-based conditions that will cause a Non-Maskable Interrupt (NMI) signal to be sent to the microprocessor. The first condition occurs when an active IO Channel Check (IOCHCK) signal is received from an adapter card located in one of the board's expansion slots. The other event that will cause an NMI signal to be generated is the occurrence of a Parity Check (PCK) error in the system's DRAM memory. Because these errors indicate that information from I/O devices or memory cannot be trusted, the NMI signal will cause the system to shut down without storing any of the potentially bad data.

Reference Shelf For more information, refer to the Electronic Reference Shelf, "How Interrupts Work," located on the CD that accompanies this book.

Direct Memory Access

Direct Memory Access operations are very similar to interrupt-driven I/O operations, except that the controller does not ask the system microprocessor to stop what it is doing to manage the I/O operation. Instead, the DMA controller asks the microprocessor to get out of the way so that it can control the system and handle the I/O transfer. The DMA controller is a specialized microprocessor that can conduct the transfer much faster than the standard microprocessor can. Table 3.2 describes the system's DMA channel designations.

Table 3.2 System's DMA Channel Designations




Page Register Address

































The system's FDD controller uses DMA channel 2 by default. Newer parallel port modes, such as ECP mode, can be assigned to any of the other open DMA channels. DMA channel 4 is used internally to cascade the two, four-channel DMA controllers together.

Exam Tip

Know how many DMA channels are available in a typical AT-compatible PC.

Onboard I/O

When dealing with a PC-compatible, there are two forms of I/O to contend with. These include the system board's onboard I/O as well as peripheral devices that interact with the system through its expansion slots.

Exam Tip

Memorize the typical DMA channel assignments in a PC.

Most of the I/O functions associated with PC-compatible systems have become so standardized that IC manufacturers produce them in single-chip ASIC formats. Figure 3.3 illustrates an ASIC for standard, AT-compatible system board functions.

Reference Shelf For more information, refer to the Electronic Reference Shelf, "How DMA Works," located on the CD that accompanies this book.

Figure 3.3 Onboard I/O.

Certain I/O connections have become standards associated with PC-compatibles. These include the system's parallel printer ports, RS-232 serial ports, and the game port. Figure 3.4 depicts an M/IO ASIC for standard peripheral control.

Figure 3.4 System I/O methods.

In both cases, the I/O controllers integrated into the ASIC are responsible for matching signal levels and protocols between the computer system and the I/O device. The system communicates with its onboard intelligent devices using I/O addresses. The onboard address decoder converts addresses from the address bus into enabling bits for the system's intelligent devices. These addresses are included in the overall I/O addressing map of the system.

Exam Tip

Memorize the I/O port addresses for the first and second IDE controller.

In a PC-compatible system, standard I/O adapters employ the various I/O port addresses listed in Table 3.3. Notice that these addresses are redundant with those stated for the system's interrupt vectors given in Table 3.4. PC-compatible computers handle addresses differently depending on whether they are identified in software as memory or I/O addresses.

Table 3.3 I/O Port Addresses

Hex Address




DMA Controller



Interrupt Controller






Keyboard Controller



Real-Time Clock, NMI Mask



DMA Page Register



Interrupt Controller



Clear Math Coprocessor Busy



Reset Math Coprocessor



Math Coprocessor



Second IDE Controller



First IDE Controller



Game Port



Parallel Printer Port #2



Serial Port #2



Parallel Printer Port #1



MGA/first Printer Port






FDD Controller



Serial Port #1



USB Controller


Table 3.4 System Memory Map




Interrupt Vectors




BASIC and Special System Function RAM


Program Memory


VGA/EGA Display Memory


Monochrome Display Adapter Memory


Color Graphics Adapter Memory




EIDE/SCSI ROM (also older HDD Types)


BIOS Extension Area ROM


LAN Adapter ROM


BIOS Extension Area ROM


BIOS Extension Area ROM


BIOS Extension Area ROM


BIOS Extension Area ROM


BIOS Extension Area ROM





Challenge #2

A friend has called you because he is working on a system that has several legacy devices installed and he does not remember what resources are assigned to typical devices in a PC-compatible system. He needs for you to fax him a list of these devices. Because you have become a very successful computer technician, you are on a cruise and do not have access to your resource materials. What information can you send him from your memory?


As mentioned in Chapter 1, "Basic Terms and Concepts," modems come in two common types—internal and external. Both types of modems depend on a serial communication device called a Universal Asynchronous Receiver-Transmitter (UART) to carry out the serial-to-parallel and parallel-to-serial data conversions. In the case of an internal modem, the UART is normally located on the adapter card. With an external modem, the UART is usually provided by one of the PC's serial communications (COM) ports. The modem connects to the serial port through a standard RS-232 25-pin D-shell connector.

In the case of the internal modem, the UART in the modem normally replaces one of the two COM port UARTs provided by a typical PC system. If the COM port UART is not disabled, the system might have trouble differentiating between the two ports and a conflict can develop. Therefore, it is common practice to disable an onboard UART when an internal modem is installed. The COM ports can be enabled or disabled through the system's CMOS Setup—Peripherals screen.

Exam Tip

Be aware that you might need to disable the second onboard COM port to install an internal modem.

In AT-style PCs, the first UART is normally used with the system's serial mouse. From the tables in this chapter, you can see that it resides at addresses 3F8 through 3FFh, uses IRQ4, and is assigned the designation of COM1. Therefore, the modem (or its host COM port) should be configured for addresses 278 through 27Fh, IRQ3, and COM2.

In ATX systems, the mouse has been provided with a special PS/2 mouse port, along with its own resources—including IRQ12. Therefore, a modem would be free to use COM1 or COM2 in these systems.

Floppy Drive Controllers

Most Pentium system boards contain the Floppy Disk drive Controller (FDC) circuitry and its physical interface connection. In older units, this circuitry and connector were typically located on an MI/O adapter card. The Pentium system board provides a standard 34-pin, two-row Berg connector as the FDD physical interface (typically labeled FD1). PC-compatible systems use a 34-pin flat ribbon cable as the FDD signal cable. This cable connects the system board's FDD interface with one or two floppy disk drives.

The FDC portion of the system board's chipset provides a programmable, logical interface for up to two FDD units. It resides in the I/O address range between locations 370 and 37Fh. The FDC receives and decodes instructions from the system to the floppy disk drive at these addresses. It also decodes these commands and generates the proper signals to carry out the command. Finally, it converts the data from the parallel format of the system to the encoded serial format used by the disk drive. The typical FDC divides the floppy disk into 80 tracks per side, with 9 or 18 512-byte sectors per side. This provides the system with 737,280 (720KB) or 1,474,560 (1.44MB) total bytes of storage on each diskette.

In a PC system, the FDC operates in conjunction with the system's DMA controller and is assigned to the DRQ-2 and DACK-2 lines. In operation, the FDC presents an active DRQ-2 signal to the DMA controller for every byte of data to be transferred. After the last byte has been transferred, the FDC interrupt is generated. The floppy disk drive controller is assigned the IRQ-6 channel in PC-compatible systems. The FDC generates an interrupt signal each time it receives a Read, Write, or Format command from the system.

Exam Tip

Know which resources are used by the floppy disk drive system.

Hard Drive Controllers

Typical Pentium-based system boards include one or two enhanced IDE controllers to handle the hard disk drive hosting function. Each controller can handle up to two IDE drives. This provides the PC with the capability of controlling up to four IDE devices. The first drive at each connector is called the master and the second is called the slave. The first, or Primary IDE, controller is assigned IRQ14, whereas the Secondary controller uses IRQ15 to interrupt the system. The system board supplies two 40-pin BERG connectors that are typically labeled IDE1 and IDE2. Each connector corresponds to an IDE controller.

Generally, the master drive doesn't have anything to do with the operation of the slave drive. Whether a drive operates as master or slave is typically determined by the settings of configuration jumpers on each drive. If the drive is the only unit attached to the host connector, it can be configured as a single drive. The address decoding logic on the host adapter will then oversee the selection of either drive. The first IDE drive controller responds to I/O addresses between 1F0h and 1F7h, whereas the second answers to addresses between 170h and 177h.

Exam Tip

Memorize the address ranges of the first and second IDE controllers in a PC system.

Older hard drives required that the CMOS Setup parameters of the computer match the parameters of the drive that was connected to the system, specifying such things as the number of R/W heads and number of cylinders being used. In those units, the drive needed to match one of the configurations in the computer's drive-parameter tables. This table was a function of the system's BIOS. However, the last entry in the table was typically reserved for user entered parameters that could be used for drives not listed in the table.

Most of the newer IDE drives include a feature called translation mode. These drives add a microprocessor to the controller's electronics that determines what configuration the computer expects, and then adjusts itself to mimic that drive layout, within the limitations of the drive's geometry. Because of the sector translation and matching work the IDE controller performs, the host system is isolated from the actual layout of the heads and cylinders on the drive. It only sees its logical configuration presented by the controller, which matches the CMOS setting. This makes the IDE interface a system-level interface.

A growing number of system boards include SCSI interface support in their BIOS. However, very few include a physical onboard interface connection. This interface is typically found on a SCSI host adapter card that plugs in to one of the system's expansion slots.

USB Ports

Most ATX system boards include dual Universal Serial Bus (USB) connectors as a standard part of their I/O port offering. The onboard USB controller resides between the I/O addresses of FF80 and FF9Fh. The USB controller is also assigned an IRQ channel (such as IRQ10) by the PnP process.

The operation of the port connections is controlled by settings in the system board's CMOS Setup Utility. In most cases, it will be necessary to access the CMOS Setup Utility's PCI Configuration screen to enable the USB function and assign the ports IRQ channels to use. If no USB device is being used with the system, the IRQ allocation should be set to NA to free up the IRQ line for use by other devices.

Infrared Port

Infrared Data Association (IrDA) ports are very popular with notebook computers. These ports provide short-distance wireless connections for different IrDA-compliant devices, such as printers and personal digital assistants. Because the IrDA port communicates by sending and receiving a serial stream of light pulses, it is normally configured to work with the UART of the system's second serial port. This arrangement must be established in the Peripherals page of the CMOS Setup utility, as illustrated in Figure 3.5. In this manner, the infrared port is assigned the same system resources normally reserved for the COM2/COM4 serial ports (that is, IRQ3, 2F8-2FFh, or 2E8-2Efh).

Figure 3.5 Enabling the infrared port.

To enable the IrDA port, the mode for the COM2 UART must be set to automatic and one of the infrared protocol settings (HPSIR or ASKIR) must be selected. In addition, the transmission duplex mode must be selected (normally half duplex). The operation of the infrared port and the second serial port are mutually exclusive. When the infrared option is enabled in CMOS, the second serial port will be disabled.

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020