home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / linux / 25418 < prev    next >
Encoding:
Text File  |  1993-01-25  |  1.5 KB  |  34 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!mcsun!news.funet.fi!fuug!ichaos!jlaiho
  3. From: jlaiho@ichaos.nullnet.fi (Juha Laiho)
  4. Subject: Re: ?? Why no out/in in assembler ??
  5. Organization: NullNet r.y.
  6. Date: Mon, 25 Jan 1993 05:14:45 GMT
  7. Message-ID: <C1E98M.4JE@ichaos.nullnet.fi>
  8. References: <C1DpM9.H6L@helios.physics.utoronto.ca>
  9. Lines: 23
  10.  
  11. In article <C1DpM9.H6L@helios.physics.utoronto.ca> grindley@helios.physics.utoronto.ca (Robin Grindley) writes:
  12. >I am trying to write a small program to allow me to output and input values
  13. >to the serial port (for testing something on my mouse). I tried writing
  14. >inline assembly code, but it says there are no such instructions as in/out.
  15. >
  16. >  So firstly, why are there no port I/O assembler commands available, and
  17.  
  18. Here we go again. Linux is designed to be multi-user multi-processing
  19. environment. In such environment there is no reason to let anyone do direct
  20. port-I/O. Just think. There's unixes with shell access, and a C Compiler
  21. available. How about if someone dials into one, does a nice little pgm
  22. to do port-I/O, and thus trashes the hard disk?
  23.  
  24. Oh, about the kernel. It runs on a different protection level, and IS allowed
  25. to do port-I/O to be able to provide _controlled_ access to devices for
  26. any normal programs.
  27.  
  28. I think you could do that mouse testing by teading/writing the device to which
  29. your mouse is connected. F.ex. I have MouseSystems compatible serial mouse,
  30. and it's connected to /dev/ttyS0. If I wanted to have a chat with the rodent,
  31. I'd write to /dev/ttyS0 and read the same.
  32.  
  33. ..Wolf
  34.