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