By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,227 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,227 IT Pros & Developers. It's quick & easy.

Plz explain the outportb function

P: 17
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
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,510
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
100+
P: 2,476
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.