473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 18430
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

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

Similar topics

10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
4
by: Pegboy | last post by:
I am updating a utility to capture serial port data that was originally developed as a DOS app using the outportb() and inportb() routines. I am trying to re-work it as a Win32 app using Borland...
2
by: rick | last post by:
Greetings to all, i am not sure this is the write group to post my question to. If it is not i apologize. In the mean time if you have the answer to my question please help. THANKS!! i am...
2
by: System Administrator | last post by:
function a() { } typeof a //returns 'function' a instanceof a //returns false typeof Object //returns 'function' Object instanceof Object //returns ...
1
by: td0g03 | last post by:
Hello, I am new to C and I am new to English. I not sure what palindromes mean. I don't know exactly what my teacher wants me to do. If someone could explain it to me in a different way that would be...
1
by: dennis.sprengers | last post by:
I've compared some open-source javascript editors, and found different techniques for constructing the code. Two examples: CodePress.run = function() { new CodePress(t); } CodePress =...
21
by: globalrev | last post by:
i have a rough understanding of lambda but so far only have found use for it once(in tkinter when passing lambda as an argument i could circumvent some tricky stuff). what is the point of the...
3
by: maheshchintu | last post by:
Can i use outportb() in windowsXP...... then how should i interface PC's parallel port with outside circuits for my project,.... is there any exact replacement for outportb().
5
by: kaushalneo | last post by:
anyone can plz explain the code below....i have understood the basics of outortb and inportb but couldnt understand why and where specific hexcode values are used #include<stdio.h> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.