quoting directly from my c++ compiler.....
DOS.h
þ inport reads a word from a hardware port
þ inportb reads a byte from a hardware port
þ outport outputs a word to a hardware port
þ outportb outputs a byte to a hardware port
Declaration:
þ int inport(int portid);
þ unsigned char inportb(int portid);
þ void outport(int portid, int value);
þ void outportb(int portid, unsigned char value);
Remarks:
þ inport works just like the 80x86 instruction IN. It reads the low
byte of a word from portid, the high byte from portid + 2.
þ inportb is a macro that reads a byte
þ outport works just like the 80x86 instruction OUT. It writes the
low byte of value to portid, the high byte to portid + 1.
þ outportb is a macro that writes value
Argument³ What It Is
portid ³ Inport port that inport and inportb read from;
³ outport port that outport and outportb write to
value ³ Word that outport writes to portid;
³ byte that outportb writes to portid.
If you call inportb or outportb when DOS.H has been included, they are
treated as macros that expand to inline code.
If you don't include DOS.H, or if you do include DOS.H and #undef the
macro(s), you get the function(s) of the same name.
Return Value:
þ inport and inportb return the value read
þ outport and outportb do not return
Name Address IRQ
COM 1 3F8 4
COM 2 2F8 3
COM 3 3E8 4
COM 4 2E8 3
does this help you?