PORT# assignments

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
slacker

PORT# assignments

Post by slacker »

i was wondering who(or what) assigns certain things certain ports. like 0x60 is for keyboard? is this port always the one for the keyboard? is there a standard out there for port assignments or do these ports correspond to a certain chipset?
_mark

Re:PORT# assignments

Post by _mark »

I'd be interested if there is an official document on this also. My guess though is it is an "un-written" standard with most of it's roots back when IBM controlled the PC market. PC clones had to implement things the same as IBM to ensure software compatability, so there are bound to be some document somewhere, if they are official or not who knows? I do not think the chipset matters as much as the fact that it is "IBM compatible". A term we unknowingly apply to all PCs now adays. IT is kind of funny how time can do that. I guess if you think about it the term has changed to "Windows Compatible" and sometimes you even get a little sticker on the PC that says "Built for Windows XP". The bottom line is that PC was just built to clone IBM standards put in place many many years ago.

_mark
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:PORT# assignments

Post by distantvoices »

You'll find these ports in linux or Minix. you have to search for them, but they are to be found. Also, several documents on osdev.neopages.net show some ports. (f. ex. floppy disk controller).
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Dragonsimoto

Re:PORT# assignments

Post by Dragonsimoto »

I dont think that was the question...We know the doc's on osdev.neo.... are there..

We would like to know where this standard came about. He also would like to know where he could find an IBM or such doc that define this.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:PORT# assignments

Post by distantvoices »

Mr. Dragon, I am of course capable of merging letters to words, words to sentences, extract syntax and semantics ... in short words, to understand what is said. Got me right?

If you expect any documentation out there claiming to consist all the ioports for adressing a device, you might find out: there are MANY standards. Memory mapped IO as is used on pc i386 architecture feases the creation of io ports on any adress in memory. Why don't you stick yourself behind a desk and stuff such a documentation together, when you are so eager to have it?

Of course, there are some device ports you can expect on a certain adress: f. ex. Keyboard data, keyboard status (0x60,0x64), PIC (0x20,0xa0), FDC(0x3f0), and so forth.

I recommend you to look at the thread "Book Recommendations", or to look on certain internet sites for Messmer: The Indispensable PC Hardware Book, or Frank van Gilluwe: the undocumented PC
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PORT# assignments

Post by Pype.Clicker »

a list of port assignment to chips is available in HelpPC. but this only covers the "ISA" standard ports ...
Therx

Re:PORT# assignments

Post by Therx »

try motherboard chips/io ports by ralph brown on http://xinit.port5.com
slacker

Re:PORT# assignments

Post by slacker »

i didnt want a list of port assignements when i posted this. i was wondering WHY certain things allways have the same port numbers. why is port 0x60 usually for the keyboard? why is port 0xa0 for the pic?
why isnt the pic mapped to port 0xFFFF?
why isnt the keybaord mapped to port 0x01? etc?

the question is where do these port assignments come from? is there a standard out there because port 0x60 is always for the keyboard.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:PORT# assignments

Post by distantvoices »

hmmm...

I remember from my early c64-assembler fiddlings, that this device mapping has to do with address lines the components are connected to on the mainboard. you know, there are several busses floating around, amongst whose to mention: adress bus, data bus, system bus ... But I don't remember exactly. Would need some further research.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:PORT# assignments

Post by Pype.Clicker »

there are several weird things that occur with the valid addresses. But roughly, you cannot allocate separate ports number for devices: you can only allocate 16 ports at a time, so this is why you usually see devices using 0x60, 0x61, 0x62 ...

There must of course be standards where things like these are stated. If any manufacturer could put its keyboard controller wherever they wish, how could you even access it ??
slacker

Re:PORT# assignments

Post by slacker »

Pype.Clicker: that was what i was thinking
Curufir

Re:PORT# assignments

Post by Curufir »

I'm not convinced there is any clearly defined standard. You have to remember that a lot of the PC devices (FDC/PIC/PIT etc) might come from different sources, but are in actual fact clones of the original tech.

Because the devices are clones of each other, or based on clones of each other, a lot of the low level stuff remains compatible.

In short I think this is one of those situations where it looks like there's a standard, smells like there's a standard, when in actual fact there is no standard whatsoever.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:PORT# assignments

Post by distantvoices »

I think the port adresses result of the hardwiring of the devices located on the mainboard. Somehow you must be able to adress a device.

Take for example a pic master (microcomputer). you have to program this little thingy via asm and you can do a whole bunch of nifty things with it: the version which I 've learned to use whilst study had eight input/output PINS. When I told it to read from ONE pin, say pin 3, then I said "in (2)", after having setup a mask of input and output pins, thus telling this small processor from which pins to expect external input. on an Input pin I had then to put HIGH: and voila, there was input and the PIC reacted and did f. ex. move around a stepper motor by two step.

The Pins were adressed with numbers from 0 to 7. the same it is with devices hard wired onto the mainboard or plugged into the pci slots. They have to be adressed via adress bus (or data bus?) since they are connected on it, and the port numbers reflect these adresses.

And since IBM designed the pc architecture, there exists a standard about at which position which part is wired in, thus giving the kbd controller and the pic their positions in the wire plan.

If there comes along someone with better experience on these technical terms, he could tell this more precisely then me. I lack both those terms and the deep experience.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply