473,503 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

code to save information on a text file

6 New Member
#include <stdio.h>
#include <dos.h>
#include <conio.h>

/*****************************************/
/*This function read parallel port inputs*/
/*****************************************/
hi,

I have this piece of code below to read data from praralell port. however i now need a piece of code that would save the data to my created text file after reading it from the parallel port.

please help
thank you


int Read_Input()

{int Byte;

Byte=inportb(0x379);
return Byte;}

void main (void)

{int PP_Input;

clrscr();
PP_Input = Read_Input;
printf("%d",var);
getch();}
Mar 20 '07 #1
3 2306
afshana
6 New Member
hi,

I have this piece of code below to read data from praralell port. however i now need a piece of code that would save the data to my created text file after reading it from the parallel port.

please help
thank you



#include <stdio.h>
#include <dos.h>
#include <conio.h>

/*****************************************/
/*This function read parallel port inputs*/
/*****************************************/


int Read_Input()

{int Byte;

Byte=inportb(0x379);
return Byte;}

void main (void)

{int PP_Input;

clrscr();
PP_Input = Read_Input;
printf("%d",var);
getch();}
Mar 20 '07 #2
RedSon
5,000 Recognized Expert Expert
Your threads have been merged, do not double post.

MODERATOR
Mar 20 '07 #3
horace1
1,510 Recognized Expert Top Contributor
have a read thru this tutorial on file I/O
http://www.cprogramming.com/tutorial/lesson10.html
Mar 20 '07 #4

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

Similar topics

4
4112
by: hoke | last post by:
I want to display plain text files in the browser. The files contain html and javascript and have a .txt extension. This works fine with files with just html. Unfortunately when showing files with...
1
3999
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
11
18959
by: Thomas Magma | last post by:
I have a simple JavaScript application that will generate some text type data for the end user. Is it possible to have a button that will allow them to save this information to a text file? ...
23
2383
by: Babak | last post by:
Hi Everyone, I've written a standard C code for a simple finite element analysis in MSVC++ . When I save the file as a cpp file, it compiles and runs perfectly, but when I save it as a c file,...
1
2171
by: relisoft | last post by:
SEATTLE, Washington. - July 12, 2006: Reliable Software® announces the upcoming release of Code Co-op® version 5.0. Code Co-op is an affordable peer-to-peer version control system for distributed...
53
4595
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
4
2627
by: Richard Lewis Haggard | last post by:
I have an application that can't use the registry to save various user options and application settings. My first thought was to simply use an application configuration file but this approach seems...
13
3515
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
0
2028
by: crazyyellowguy | last post by:
hi, This is my first post in this forum and I just wanted to thank you for even taking a look at my post. The class that I am writing the C code for is my first computer class and my knowledge is...
1
1460
by: JoshPierce | last post by:
I want to allow users of my program to click File>Save and have a save dialog open and allow them to save all of their input. here is the background of my program. I have a program that allows...
0
7202
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
7086
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...
0
7280
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,...
1
6991
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
7460
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
5578
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,...
1
5014
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.