2

First of all, I'd like to say this is a hardware-level question, which is very closely related to the "in" and "out" command in x86 assembly.

I have searched for quite some time, but I still haven't found how they send the addresses and the data. Does the 8086 first send the address, then the data? If so, how does the receiver know if the 8086 is sending a 16-bit address or an 8-bit address?

Aside from that, I'd also like to learn how the 8255 works, and how it accepts specific ports such as "port 60H".

Thanks for reading! :D

  • 2
    Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask – gnat Dec 15 '13 at 15:16
  • 1
    Perhaps you could define what you mean by "send the address." An out instruction writes data to a specific port, just like a mov instruction writes data to a specific memory location. The only difference is the physical wiring. – kdgregory Dec 15 '13 at 16:38
  • it took a single google search, second or third link I looked at answered your questions. What is it you looked for and where? – old_timer Dec 16 '13 at 6:59
2

As you mentioned 8086 processor i'm explaining with reference to 8086:

8086 is 16-bit processor(16-bit Data Bus means: no.of Physical lines to carry-out or carry-in are 16 lines some time ALU size also) and 20-bit Address Bus(20-bit Address Bus means : no.of Physical lines to carry-out the address are 20) these lines are nothing but 8086-pins.

To save No.of 8086 pins 16-data bus lines and 16- Address lines are multiplexed(during first part of Machine cycle 16-lines acts as Address bus later they acts as DATA Bus line) so pin count will be reduced.

Now your main Question Answer: Case:1(8086 wants to access a Byte in a Memory) 8086 can address 2^20(Address Bus size) Locations, each location holds a Byte(8-bits of data) that implies (2^10 x 2^10 =1024(1K) x1024(1K)=>1M) finally it ought to be 1MByte

Memory: Like USB Drive(2GB, 4GB,etc.) Each memory location has an Address and Location holds a byte(8-bits) suppose 1MB memory Chip will have 1024K Memory locations and each location has 8-bits data unit capacity

If 8086 Processor wants access a byte at an address first it'll send Address to to 1MB memory chip let say(0x20002) Location, this 1MB memory chip is connected to the 8086 Address bus and data bus. it's like below

  1. 8086 address on address bus to 1MB Memory Chip
  2. 1MB memory Chip will receive address on its address Bus(0x20002)
  3. 8086 waits for awhile to sync with memory waiting time(memory may slower than Processor )
  4. 1MB Memory Chip will send out requested byte on the data bus lines to 8086
  5. 8086 reads in the receiving byte

There is another case if the memory is stack of memory chips like two 512KB chips of total 1MB(512KB + 512KB) In this case each memory chip has 19 address lines(512K = 512 x 1024 =>2^9 x 2^10) and one Important line called CHIP SELECT which enables the memory Chip Both Memory chip address line are connected to 8086 address bus But 8086 has 20 address lines so one line is used to connect Chip Select line of 512K Memory Chip which Enables the 512KB chip Here 1 address line has two states:0 or 1

  1. 0:is used to select one memory Chip-A-521KB + 19 Address line
  2. 1:is used to select second memory Chip-B-521KB + 19 Address line

Another case if memory size of 256 Bytes capacity(2^8), It has 8-ADDRESS LINES and a Chip Select Line

In the above case just 8 address line of 8086 are connected to the 256 Bytes Memory Chip but reaming are connected to the Chip select line of memory chip it maybe NOR gate whose output is one if all the inputs are zero

here let say 20 address lines(A19-A0) of 8086

  1. Address Lines A7-A0 are connected to the 256 bytes Memory Chip
  2. Reaming Address lines i.e A19 to A8 are connected to the Chip Select Line of memory Chip Through 14-Input NOR gate Whose out put is One if All the inputs are Zero i.e.(A19-A8=0x0 00)
  3. Above Procedure is called Address Decoding 4. The Address Range for 256 Bytes memory Chip is(A7-A0=>0x00 to 0xFF) But 8086 has 20-Address Lines So Reaming lines are connected to Chip select of 256 Bytes memory Chip through NOR gate So final Address range is 0x000 00 to 0x000 FF in this way 256 Bytes Memory Chip is addressed

In this way Processor access data from Memory Chip with the help of address and Data Bus

Case:2(some device may wants send data to 8086) It's very complex to explain here but soon i'll add to this question

finally about 8255 please refer this intel 8255 Wiki Page

  • Please do the case 2, considering I already know about case 1. Thanks for helping by the way. – Myrl Dec 17 '13 at 13:54
  • 1
    None of this answers the question. The OP asked about I/O ports, not about memory access. – Euro Micelli Jul 5 '15 at 12:32
-1

The address needs to be established before the data is sent to reduce communication cost. To do this, a low-level protocol called ARP broadcasts an ARP request and when the host(identified by an IP address) you are looking for responds, the physical address is mapped to an IP address in a cache on your machine. The ARP message is carried in the 'frame data area' along with a frame header. Once this connection is going the length of the fields depends on the hardware and protocol address lengths. So 6 octets for Ethernet address and 4 octets for an IP address.

  • 1
    This question is about cpu I/O ports, not networking ports. – 8bittree Mar 8 '18 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.