469,623 Members | 900 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Plz explain the outportb function

Anyone plz explain outportb function.And also explain the code below........

#define PORT1 0x3F8

outportb(PORT1 + 1 , 0);
outportb(PORT1 + 3 , 0x80);
outportb(PORT1 + 1 , 0x00);
outportb(PORT1 + 3 , 0x03);
outportb(PORT1 + 2 , 0xC7);
outportb(PORT1 + 4 , 0x0B);
Mar 23 '07 #1
2 16957
horace1
1,510 Expert 1GB
Anyone plz explain outportb function.And also explain the code below........

#define PORT1 0x3F8

outportb(PORT1 + 1 , 0);
outportb(PORT1 + 3 , 0x80);
outportb(PORT1 + 1 , 0x00);
outportb(PORT1 + 3 , 0x03);
outportb(PORT1 + 2 , 0xC7);
outportb(PORT1 + 4 , 0x0B);
one way to interface input/output devices to a computer is via IO ports - comands and data are writen and status information and data read. In this case 0x3F8 is the base addess of the COM0: serial port on a PC. the function call
Expand|Select|Wrap|Line Numbers
  1. outportb(PORT1 + 1 , 0);   
writes a byte(0 in this case) to a port - have look at Part 2: serial port registers
http://www.beyondlogic.org/serial/serial1.htm
Mar 23 '07 #2
dmjpro
2,476 2GB
thanxxx alot ... horace1 i got today what i have been looking for since my third year of Eng.....

again thanxxxx aloott
Mar 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Pegboy | last post: by
2 posts views Thread by rick | last post: by
21 posts views Thread by globalrev | last post: by
3 posts views Thread by maheshchintu | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.