How to perform 32 bit IO Opertion on 16 bit machine

Status
Not open for further replies.

rajesh.v

Posts: 9   +0
Hello,


I want to perform a IO write of 32 bits on a 16 bit machine. So, I tried
to IO write 16 bits in 2 cycle using outport function i.e.

outport(port, ValueLower);
outport(port + 2, ValueHigher);


In doing so, only the value written during the second cycle is in effect i.e the
value (ValueHigher) written to (port + 2) exists. But, the value (ValueLower)
written to (port) does not exists (...some junk value is present at the lower 2 bytes).

Is there any way I can perform a 32 bit IO Operation on a 16 bit machine.

Thanks in Advance,
Rajesh.V
 
It would sort of help if we knew what kind of machine and hardware you are talking about and what kind of development environment..
 
Hi,

I am using DOS system/ 8086 processor and turbo C compiler. The IO device which is used is ethernet controller "Reatek 8139".
 
First, x86 hardware IO does not look like memory. A word written to port X does not magically appear in ports X and X+1. When you write to a port, the port address goes on the address bus and the data goes on the data bus. When a device see its own IO address on the address bus, it grabs the data from the data bus and copies it to its internal register.

It looks like the 8139 is a 32-bit chip, so you can't interface it directly with a 16-bit bus. You'd need some sort of glue logic that would take the high word from port address X and the low word from port X+1 for example.
 
Thanks for your response....

I don't understand what was the glue logic which is spoken about...

Moreover, I am using a PCI bus which is 32 bit... so, doesn't this help me to interface with the 8139 chip...
 
And how have you connected the 32-bit PCI bus to your 16-bit CPU? Don't you have many wires left over? :p

Any other "minor" hardware you haven't mentioned?

Maybe you should just say what exactly you want to achieve and what hardware you have. Down to the last chip and PCB..
 
Status
Not open for further replies.
Back