How to read a hardware port w/ gcc?

How to read a hardware port w/ gcc?

Post by Bill Krimm » Mon, 07 Aug 1995 04:00:00



Help!
I'm trying to read the joystick port at 0x0201, and can't find my dos friends
inp() or inputw() in the gcc unix environment.  I know that direct control of
hardware is * under multitasking, but this is read only.  Is there kernel
support?  and is there a man page or info file I can read?
Thanks,
Bill krimmel

 
 
 

1. Reading/writing from/to hardware ports with gcc and linux

In DOS, I have "inportb" and "outportb" for reading and writing to a
specific hardware address.  I have been trying with zero luck to find a
way to do this with gcc and linux.  I know that it is more difficult in
linux, since the os is much better protected, but surely there is a
standard function for doing this isn't there??  

Please help, I'm desperate!

Thanks!

Tim
  --------------------------------------------------------------------------
   Timothy Hamlin ** thamlin at nmt dot edu ** http://www.nmt.edu/~thamlin/
  --------------------------------------------------------------------------
       Department of Physics, NMIMT, Socorro NM 87801
       Office, Workman 317: 835-5381  Lab, Workman 246: 835-5137
       Home,   Polvadera  : 835-0805
       "Linux, the choice of a GNU generation."

2. How to write a general purpose function ???

3. How to read a hardware port w/ gcc?

4. help: Adaptec 2842 VLB and Solaris 7

5. Writing and Reading Hardware Ports

6. 'Trust' NE2000 compatibles

7. reading/writing port functions for GCC?

8. Connecting names to IP addresses

9. polling a port addres for a clock pulse and reading and writing data to RS422 port

10. reading port x -> writing port y

11. HARDWARE HARDWARE HARDWARE

12. gcc destroys source file (hardware defect?)

13. Linux freezup...gcc?? hardware??