inb() and outb()

From: Belinda (belinda_ye@yahoo.com)
Date: Sun Sep 30 2001 - 14:09:54 EST


Hi, all

I wrote a simple program with inb() and outb().
However, it reports the segmentation error when
running it.

The code follows as:
---------------------------------
#include <asm/io.h>

#define LPT 0x378

void write_LPT(unsigned char byte)
{
    outb(byte, LPT);
}

int main()
{
   write_LPT(LPT);
   printf("Value:%c", inb(LPT));

}
------------------------------------------------------

Thanks,

Belinda

__________________________________________________
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 30 2001 - 21:01:14 EST