inb() keyboard port

K

Kris

Hi!
I've written such a piece of code to get the access to keyboard port:
#include <sys/io.h>

iopl(3);
ioperm(0,0x400,1);
unsigned char c;

then, when I want to read directly from keyboard, during a loop in my
program, I do the followind

c=inb(0x60);
if (c==(key_code) {action;}

and everything works fine with any Linux distr. but I'd like to run the
program under Solaris. What should I change?


TIA

Regards,
Kris
(e-mail address removed)


Kris
(e-mail address removed)
 
S

Sidney Cadot

Kris said:
Hi!
I've written such a piece of code to get the access to keyboard port:

What you are trying to do is inherently platform-dependent, and
therefore off-topic here.

You're much better off asking the question in a platform-specific
newsgroup (one dealing with Suns, in this case).

Best regards.

Sidney
 
T

Tom St Denis

Sidney Cadot said:
What you are trying to do is inherently platform-dependent, and
therefore off-topic here.

BUZZ WRONG.

It's offtopic because it isn't about the C language [hint: discussion about
right shifting signed values seems to be on topic here]

Thanks for playing the mindless moderator game.

Tom
 
A

August Derleth

Tom said:
Kris wrote:



What you are trying to do is inherently platform-dependent, and
therefore off-topic here.


BUZZ WRONG.

It's offtopic because it isn't about the C language [hint: discussion about
right shifting signed values seems to be on topic here]

Thanks for playing the mindless moderator game.

Another graduate of the Dan Pop Charm School. ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top