Thread View: comp.os.msdos.programmer
5 messages
5 total messages
Started by Thomas Dwyer III
Tue, 14 Aug 1990 15:41
Programming the keyboard port
Author: Thomas Dwyer III
Date: Tue, 14 Aug 1990 15:41
Date: Tue, 14 Aug 1990 15:41
29 lines
1469 bytes
1469 bytes
According to my "Z-386/AT Series Workstation Technical Reference Manual, Volume II Programmable Registers" book, page 17-2 it says: The Status Register (Port 064H) The Status register is an 8-bit read-only register. [text ommited] Now on page 17-3 it says: Command Register (Port 064H) The command register is an 8-bit write-only register, addressed at I/O port 064H. [text ommited] Ok people, how can the same port be both read-only and write-only? Am I missing something? Am I correct in thinking that if I write a SCP command (page 17-5) to port 064H than I can read the results of the command from port 060H? My tests show that any value written to port 064H followed by a read of port 060H results in a 01CH being read. Any help on this would be most appreciated. Thanks, Thomas Dwyer III TOMIII @ MTUS5.BITNET Network Programmer DWYERIII @ MTUS5.BITNET Computing Technology Services Michigan Technological University
Re: Programming the keyboard port
Author: Jim Alves-Foss
Date: Wed, 15 Aug 1990 20:25
Date: Wed, 15 Aug 1990 20:25
20 lines
1500 bytes
1500 bytes
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?
>...
>Thanks,
>Thomas Dwyer III TOMIII @ MTUS5.BITNET
>Network Programmer DWYERIII @ MTUS5.BITNET
>Computing Technology Services
>Michigan Technological University
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)).
Hope this helps.
-Jim Alves-Foss (foss@iris.ucdavis.edu) /* Of course these are MY opinions */
(foss@[127.120.57.20]) /* and may change without warning. */
Re: Programming the keyboard port
Author: Everett Kaser
Date: Wed, 15 Aug 1990 23:17
Date: Wed, 15 Aug 1990 23:17
23 lines
1596 bytes
1596 bytes
/ TOMIII@MTUS5.BITNET (Thomas Dwyer III) / 8:41 am Aug 14, 1990 / writes... >According to my "Z-386/AT Series Workstation Technical Reference >Manual, Volume II Programmable Registers" book, page 17-2 it says: > The Status Register (Port 064H) > The Status register is an 8-bit read-only register. [text ommited] >Now on page 17-3 it says: > Command Register (Port 064H) > The command register is an 8-bit write-only register, addressed at I/O > port 064H. [text ommited] >Ok people, how can the same port be both read-only and write-only? Am >I missing something? > >Thomas Dwyer III TOMIII @ MTUS5.BITNET "Port" 64h is NOT read-only or write-only, it can be both read and written. The "Status Register" (which is accessed by READing PORT 64h) is read-only. The "Command Register" (which is accessed by Writing PORT 64h) is write-only. Be careful not to confuse a CPU I/O port with the hardware to which it's interfaced. Everett Kaser Hewlett-Packard Company ...hplabs!hp-pcd!everett work: (503) 750-3569 Corvallis, Oregon everett%hpcvra@hplabs.hp.com home: (503) 928-5259 Albany, Oregon
Re: Programming the keyboard port
Author: Dave Gillett
Date: Thu, 16 Aug 1990 05:43
Date: Thu, 16 Aug 1990 05:43
14 lines
1363 bytes
1363 bytes
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
Re: Programming the keyboard port
Author: Frank Zsitvay
Date: Sat, 18 Aug 1990 10:51
Date: Sat, 18 Aug 1990 10:51
31 lines
1466 bytes
1466 bytes
In article <90226.104110TOMIII@MTUS5.BITNET> TOMIII@MTUS5.BITNET (Thomas Dwyer III) writes: >According to my "Z-386/AT Series Workstation Technical Reference >Manual, Volume II Programmable Registers" book, page 17-2 it says: > > The Status Register (Port 064H) > > The Status register is an 8-bit read-only register. [text ommited] > > >Now on page 17-3 it says: > > Command Register (Port 064H) > > The command register is an 8-bit write-only register, addressed at I/O > port 064H. [text ommited] > > >Ok people, how can the same port be both read-only and write-only? Am When you write to port 064H you write to the command register. When you read from 064H, you read the status register, not the contents of the command register. zilog has been confusing programmers with this for years... -- fzsitvay@techbook.COM - one of these days i'll get it right... Version 2 of anything is usually the version that works.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads