1INB(1)                             I/O Ports                            INB(1)
2
3
4

NAME

6       inb, outb, inw, outw, inl, outl - access I/O ports
7

SYNOPSIS

9        inb ADDRESS
10        inw ADDRESS
11        inl ADDRESS
12        outb ADDRESS DATA
13        outw ADDRESS DATA
14        outl ADDRESS DATA
15

EXAMPLES

17        inb 0x278
18        outw 0x440 0xffff
19

DESCRIPTION

21       These commands enable command line and script access directly to I/O
22       ports on PC hardware.
23
24       The "inb", "inw" and "inl" commands perform an input (read) operation
25       on the given I/O port, and print the result.
26
27       The "outb", "outw" and "outl" commands perform an output (write)
28       operation to the given I/O port, sending the given data.  Note that the
29       order of the parameters is ADDRESS DATA.
30
31       The size of the operation is selected according to the suffix, with "b"
32       meaning byte, "w" meaning word (16 bits) and "l" meaning long (32
33       bits).
34
35       Port numbers are in the range 0-0xffff.  We don't support access to
36       memory mapped devices.
37
38       Hexadecimal numbers (prefixed by "0x"), decimal numbers, and octal
39       numbers (prefixed by 0), are allowed as parameters.
40

RETURN FROM "IN" OPERATIONS

42       The value read from the port by an "in" operation is normally printed
43       in decimal.
44
45       Use the "--hex" option to print the result as hexadecimal ("0x" prefix
46       is NOT printed).
47
48       Use the "--code" option to turn the result into an exit status.  Note
49       that Unix/shell can only reliably return exit status in the range
50       0-0x7f, so this is not particularly useful in practice.
51

TYPE AND SIZE OF OPERATION

53       The type and size of the operation is normally determined by the name
54       of the command, eg. "inb" is a read operation of 1 byte.
55
56       You can override this by using the "--read", "--write" and/or "--size
57       N" options.  For "--size N", "N" should be 1, 2 or 4 meaning byte, word
58       and long respectively.
59

PERMISSIONS

61       You would normally need to be root or have the "CAP_SYS_RAWIO"
62       capability in order to run these commands.
63

WARNING

65       Using these commands can cause Bad Things to happen to your hardware.
66

SEE ALSO

68       iopl(2), mem(4), <http://et.redhat.com/~rjones/ioport>,
69       <http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html>.
70

AUTHORS

72       Richard W.M. Jones <rjones @ redhat . com>
73
75       (C) Copyright 2009 Red Hat Inc., <http://et.redhat.com/~rjones/ioport>.
76
77       This program is free software; you can redistribute it and/or modify it
78       under the terms of the GNU General Public License as published by the
79       Free Software Foundation; either version 2 of the License, or (at your
80       option) any later version.
81
82       This program is distributed in the hope that it will be useful, but
83       WITHOUT ANY WARRANTY; without even the implied warranty of
84       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
85       General Public License for more details.
86
87       You should have received a copy of the GNU General Public License along
88       with this program; if not, write to the Free Software Foundation, Inc.,
89       675 Mass Ave, Cambridge, MA 02139, USA.
90
91
92
93ioport-1.2                        2023-07-20                            INB(1)
Impressum