3 inb, outb, inw, outw, inl, outl - access I/O ports
21 These commands enable command line and script access directly to I/O
24 The C<inb>, C<inw> and C<inl> commands perform an input (read)
25 operation on the given I/O port, and print the result.
27 The C<outb>, C<outw> and C<outl> commands perform an output (write)
28 operation to the given I/O port, sending the given data. Note that
29 the order of the parameters is ADDRESS DATA.
31 The size of the operation is selected according to the suffix, with
32 C<b> meaning byte, C<w> meaning word (16 bits) and C<l> meaning long
35 Port numbers are in the range 0-0xffff. We don't support access to
36 memory mapped devices.
38 Hexadecimal numbers (prefixed by C<0x>), decimal numbers, and octal
39 numbers (prefixed by C<0>), are allowed as parameters.
41 =head1 RETURN FROM "IN" OPERATIONS
43 The value read from the port by an "in" operation is normally printed
46 Use the C<--hex> option to print the result as hexadecimal (C<0x>
47 prefix is NOT printed).
49 Use the C<--code> option to turn the result into an exit status. Note
50 that Unix/shell can only reliably return exit status in the range
51 0-0x7f, so this is not particularly useful in practice.
53 =head1 TYPE AND SIZE OF OPERATION
55 The type and size of the operation is normally determined by the name
56 of the command, eg. C<inb> is a read operation of 1 byte.
58 You can override this by using the C<--read>, C<--write> and/or
59 C<--size N> options. For C<--size N>, C<N> should be C<1>, C<2> or
60 C<4> meaning byte, word and long respectively.
64 You would normally need to be root or have the C<CAP_SYS_RAWIO>
65 capability in order to run these commands.
69 Using these commands can cause Bad Things to happen to your hardware.
75 L<http://et.redhat.com/~rjones/ioport>,
76 L<http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html>.
80 Richard W.M. Jones <rjones @ redhat . com>
84 (C) Copyright 2009 Red Hat Inc.,
85 L<http://et.redhat.com/~rjones/ioport>.
87 This program is free software; you can redistribute it and/or modify
88 it under the terms of the GNU General Public License as published by
89 the Free Software Foundation; either version 2 of the License, or
90 (at your option) any later version.
92 This program is distributed in the hope that it will be useful,
93 but WITHOUT ANY WARRANTY; without even the implied warranty of
94 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95 GNU General Public License for more details.
97 You should have received a copy of the GNU General Public License
98 along with this program; if not, write to the Free Software
99 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.