EDN logo


Design Ideas: February 1, 1996

Routine provides four-COM-port recognition

Tom Myers,
Palo Alto, CA


In DOS-based computers with serial ports besides COM1 and COM2, the DOS-booting process does not recognize the additional ports. The BIOS RAM location 0000 0411 holds (among other data) a 3-bit count of the number of installed serial ports--enough for seven COM ports. DOS, however, recognizes and loads BIOS RAM with the base-port addresses and installed count of only two ports: COM1 and COM2. The Turbo C program in Listing 1 and the Turbo Pascal program in Listing 2 solve this DOS limitation.

The routine COM1234 identifies COM1 through COM4 by reading the interrupt-identification-register location in the hardware of each serial interface. The interrupt-identification register is a standard feature in the 8250 UART family. If a COM-port register is present, the routine stores the base address of that port in BIOS RAM. The routine also stores the total count of the COM1 through COM4 in BIOS RAM. (DI #1817)



| EDN Access | feedback | subscribe to EDN! |
| design features | out in front | design ideas | departments | products |


Copyright © 1996 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.