Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!saxony!dgil From: dgil@pa.reuter.COM (Dave Gillett) Newsgroups: comp.os.msdos.programmer Subject: Re: Programming the keyboard port Message-ID: <328@saxony.pa.reuter.COM> Date: 16 Aug 90 05:43:35 GMT References: <90226.104110TOMIII@MTUS5.BITNET> <7576@ucdavis.ucdavis.edu> Organization: Reuter:file Inc (A Reuter Company) Palo Alto, CA Lines: 14 In <7576@ucdavis.ucdavis.edu> foss@iris.ucdavis.edu (Jim Alves-Foss) writes: >In article <90226.104110TOMIII@MTUS5.BITNET> TOMIII@MTUS5.BITNET (Thomas Dwyer III) writes: >>Ok people, how can the same port be both read-only and write-only? Am >>I missing something? >Well, In the PC architecture we have 512 (not 256) ports. 256 are Input ports >and 256 are Output ports. Often a card will have a R/W register with a >single address. In your case you have TWO DISTINCT registers, one input >and one output but with the same address (064H(In) and 064H(Out)). Basically the right answer, except that the 8086 architecture allows for 16-bit port addresses, so that's 64K in and 64K out. IBM only ran ten bits of the port address out to the expansion bus, but that's still 1K of each and not 256. (I think I've seen MCA port addresses higher than 1K, but I'm not 100% sure.) Dave