Article # 221, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
COM and LPT port recognition in GEOS.
Background GEOS automatically recognizes a system's parallel (LPT) and serial (COM) ports by checking data in the system's BIOS area. If it does not recognize a port, the user will not be able to access it--it will appear "grayed out" in every menu in which it appears. Note that you can usually force GEOS to recognize a serial port by adding its port number and IRQ to the [serial] category of the geos.ini file. For example, to tell GEOS that port 3 is on IRQ 5, add this: [serial] port 3 = 5 The crucial BIOS data consists of a set of port addresses and of an "equipment word" listing which ports actually exist. Without the address list, no program--GEOS nor any DOS program--can use a port. The equipment word is ignored by some software, but GEOS does look to this piece of data to establish whether a port exists. An incorrect or overwritten "equipment word" will cause GEOS to not recognize ("gray out") a system's serial and parallel ports. Details Here is the port data from a typical SYSINFO file: Bios data area (0040h:0): 0000: f8 03 f8 02 e8 03 e8 02 78 03 00 00 00 00 00 00 "......x......" 0010: 61 48 af 80 02 00 00 00 00 00 26 00 26 00 0d 1c "aH......&.&..." Port information is located in these two lines of BIOS data, dumped directly from BIOS hardware. Serial port locations are listed least-significant-byte-first at these locations: 0000: f8 03 f8 02 e8 03 e8 02 Translation: COM1, 2, 3, and 4 are located at 03f8, 02f8, 03e8, and 02e8, respectively. From the same data, here is the location of the parallel port LPT1: 0000: f8 03 f8 02 e8 03 e8 02 78 03 00 00 00 00 00 00 "......x......" This again is least-significant-byte-first, so LPT1: is located at 0378. On this machine, there is no LPT2: The other key piece of data (and the one that sometimes causes trouble) is the equipment word on the next line, in this case 0010: 61 48 This is a sort of list of exactly what equipment is installed on the machine, including the number of parallel and serial ports installed. Again reading least-significant-byte first, this example translates to 4861 hex. In binary: 0100 1000 0110 0001 This gets interpreted as follows: bit number - interpretation - in this case ---------- - -------------- - ------------ bit 0 - set if IPL floppy present - yes bit 1 - set if math coprocessor installed - no bit 2 - set if ps/2 mouse installed - no bit 3 - set if ps/1 sound board installed - no bits 4&5 - video mode, as follows: - 80x25 color bit 5 - bit 4 0 - 0 - usually EGA 0 - 1 - 40x25 color 1 - 0 - 80x25 color 1 - 1 - 80x25 mono bits 6&7 - # of floppy drives 2 bit 8 - reserved bits 9,10,&11 - # of serial ports 4 bits 12&13 - reserved bits 14&15 - # of parallel ports 1 If this equipment word is corrupted or overwritten, GEOS may not allow access to the serial or parallel ports.