not exactlyWhen I want to send data I just set a bit to high on PORTA or PORTB and it turns on. And for receiving I just check if the pin is high. Surly their is some similarity with the Intel processors?
when you access memory (or anything mapped as memory) the CPU puts the address you are accessing on the address bus, and indicates with another pin whether it wants to read or write
then whatever is watching the address bus, sees its own address, and responds by either placing data on the data bus, or receiving the data that is on the data bus
when you us "in" and "out" instructions, what the CPU does, is put the address (in this case 0x60) on the address bus, and then indicate with another pin that it is accessing the I/O bus rather than the memory bus, then whatever device is watching for I/O writes to that particular address responds as appropriate
the CPU doesn't know that 0x60 is the keyboard, it only knows that it is an address, its the keyboard controller that "knows" it should respond to address 0x60
in the diagram you posted, those pins labled AD# are both the address and data bus, the another pin (don't remember which one) indicates whether it is an address on the I/O bus, or memory bus, and another pin indicates whether it is a read or write
of course this is a very simple view of things, modern CPUs are extremely complex, relatively speaking