public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* inb() and outb()
@ 2001-09-30 19:09 Belinda
  2001-09-30 19:29 ` Ben Greear
  0 siblings, 1 reply; 2+ messages in thread
From: Belinda @ 2001-09-30 19:09 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-09-30 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-30 19:09 inb() and outb() Belinda
2001-09-30 19:29 ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox