| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| From: | rick_pid AT yahoo DOT com |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | cant change the port number of my parallel port |
| Date: | 10 Feb 2006 10:15:13 -0800 |
| Organization: | http://groups.google.com |
| Lines: | 38 |
| Message-ID: | <1139595313.928707.96000@g14g2000cwa.googlegroups.com> |
| NNTP-Posting-Host: | 209.202.75.15 |
| Mime-Version: | 1.0 |
| X-Trace: | posting.google.com 1139595318 32236 127.0.0.1 (10 Feb 2006 18:15:18 GMT) |
| X-Complaints-To: | groups-abuse AT google DOT com |
| NNTP-Posting-Date: | Fri, 10 Feb 2006 18:15:18 +0000 (UTC) |
| User-Agent: | G2/0.2 |
| X-HTTP-UserAgent: | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) |
| Complaints-To: | groups-abuse AT google DOT com |
| Injection-Info: | g14g2000cwa.googlegroups.com; posting-host=209.202.75.15; |
| posting-account=W-Kw4w0AAAAnArW7E3sKSXQx200zh04v | |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
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?
#include <conio.h>
#include <stdio.h>
#include <dos.h>
int main()
{
char ch, ch2;
while (getch() != 'E')
{
printf ("please enter z to write zero to the parallel port \n");
printf ("please enter o to write one to the parallel port \n");
ch = getch();
if (ch = = 'z')
{
outportb (0x3BC, 0x00);
printf ("writing 0 to the parallel port \n");
}
if (ch == 'o')
outportb (0x3BC, 0x0F);
printf ("writing one to the parallel port \n");
}
};
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |