Writing to ports using C
Carl Parrish
plug-discuss@lists.plug.phoenix.az.us
02 Mar 2002 17:04:25 -0700
Not that I'm complaning, because I really don't think the list cares all
that much. But wouldn't this be a perfect thread for plug-devel. Here
are the reasons I think.
1) Just on the off chance that some programmer only subscribe to
plug-devel
2) For the people (like me) who would check plug-devel more often
3) So that non programmer wouldn't have to delete (I don't think too
many on our list would mind but still)
4)So that anyone searching the plug-devel archives wouldn't think it was
dead (or *did* we kill it?).
Carl P.
On Sat, 2002-03-02 at 09:18, foodog wrote:
> You might want to buy (or browse) a copy of Linux Socket Programming
> By Example (Que, approx $30.00). I plan to read it in my ample free
> time :-|
>
> Steve
>
> Benjamin Bostow wrote:
> >
> > I am trying to write to a port using C. So far I can only send over one char
> > at a time. The following test code is below.
> >
> > #include <asm/io.h>
> > #include <unistd.h>
> > #include <stdio.h>
> > #include <string.h>
> > #include <errno.h>
> >
> > int main()
> > {
> > ioperm(0x3f0, 15, 1);
> > outw(0x56, 0x3F8);
> > }
> >
> > Is there a way to print a string to the port, or is the only way to write an
> > entire string to convert every character to HEX and print that to the port?
> >
> > Ben
> >
> > ________________________________________________
> > See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> >
> > PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss