NAME
seg – access a named segment

SYNOPSIS
seg [ –WLrw ] segment segment–size offset [ value ]

DESCRIPTION
seg accesses a named segment as provided by e.g. certain drivers. The operation to be performed is selected with –r and –w for reading and writing, respectively. The default operation size is a byte. C style notation for integers (e.g. 0x42 or 023) is accepted for the segment–size, offset and value parameters.

W    Perform a word (16 bit) operation
L    Perform a long / double word (32 bit) operation.

SOURCE
/sys/src/cmd/seg.c

SEE ALSO
io(1)

BUGS
No check of the segment–size and offset parameters is performed whatsoever. Odd values may cause the front to fall off.

HISTORY
Seg first appeared in 9front (April, 2011).