473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

inb() keyboard port

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
ru***@wp.pl
Kris
ru***@wp.pl


Nov 14 '05 #1
3 10227
Kris wrote:
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

Nov 14 '05 #2

"Sidney Cadot" <si****@jigsaw.nl> wrote in message
news:bu**********@news.tudelft.nl...
Kris wrote:
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.


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
Nov 14 '05 #3
Tom St Denis wrote:
"Sidney Cadot" <si****@jigsaw.nl> wrote in message
news:bu**********@news.tudelft.nl...
Kris wrote:

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.

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. ;)

--
My address is yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
Note: Rot13 and convert spelled-out numbers to numerical equivalents.
Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: teddysnips | last post by:
I posted yesterday about a project I'm involved in to build a login application using a barcode scanner. I've solved most of the problems, but one remains. The client want to disable keyboard...
2
by: Dan | last post by:
I have an application that uses a COM port barcode scanner. This uses a listener to notify the application when a barcode has been scanned. The application now needs to be modified to use a Human...
2
by: Frank Rizzo | last post by:
I have a barcode scanner that hooks up to a keyboard port. I've figured out how to setup a system-wide keyboard hook. However, how do I distinguish regular keyboard input from the barcode scanner...
25
by: Romanise | last post by:
An LCD monitor with keyboard and mouse capabilities on it, thinnest possible, to hang on rack-door can be a boon for expensive spaces of datawarehouses. Has anyone come across one? Maybe...
5
by: Serdar C. | last post by:
hello everyone, i have a question about retrieving data from a bar code reader plugged in keyboard port (ps/2) i really dont know how to retrieve data from keyboard, i tried some methods but all i...
1
by: Daniel Schüle | last post by:
Hello, I am looking for simple solution to outb to parallel port. The program should run on Linux. I hope someone here already faced this problem. In C it would look like iopl(3/*mode*/);...
6
by: skam | last post by:
hi i need to send an HEX String to th ps/2 keyboard port. i have a special keyboard and i need to control his tone indicator building an .EXE file. using c or c++ in linux os how can i do? ...
2
by: rip123456 | last post by:
i need to know how to write a C program using "inb" i'm doing a project using an SBC board and the input will be a sensor.. i need to write a program so the SBC board can read the input data from...
1
by: rip123456 | last post by:
if (ioperm(0x7B,0x7A,1)) { printf("Sorry, you were not able to gain access to the ports\n"); printf("You must be root to run this program\n"); exit(1); } int s1; s1...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.