473,799 Members | 3,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Plz explain the outportb function

17 New Member
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 18661
horace1
1,510 Recognized Expert Top Contributor
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 Top Contributor
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
2172
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 second. What would cause this? Is it some kind of postgresql.conf configuration failure? I have the same query running fine on a different machine. QUERY PLAN...
4
16206
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 C++ 5.02, but am finding that outportb() and inportb() are not available for a Win32 target. There is no fancy flowcontrol or packet protocols being used, just simply capturing incoming serial data. What is available to me for such simple...
2
2974
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 trying to write a program using parallel port. I wrote this program to change the port number to one or zero. I am not able to change the port number from one to zero. It takes it sever run time to change from one to zero. WHY? ANY SUGGESTIONS?
2
1689
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 true Can anyone explain why when BOTH 'a' and 'Object' are functions,
1
2407
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 great. I know its sorta long, but maybe you only have to few the first few paragraphs. Problem: Write a program in C that generates number palindromes using the algorithm below (see 3. on the next page) and allows the user to try this...
1
1471
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 = function(obj) { self.initialize = function() {} self.toggleLineNumbers = function() {}
21
1858
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 following function? def addn(n): return lambda x,inc=n: x+inc if i do addn(5) it returns
3
2847
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
2758
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> //header// #include<conio.h> //header// #include<dos.h> //header// #include<graphics.h> //header// #include<process.h> //header// #include<time.h> //header//
0
9688
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10491
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10268
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10247
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9079
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7571
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5593
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4146
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.