CONSOLE(7A) MISC. REFERENCE MANUAL PAGES CONSOLE(7A)
NAME
/dev/console - Amiga console device
SYNOPSIS
#include <sys/types.h>
#include <sys/screen.h>
int fd;
fd = open("/dev/console", mode);
DESCRIPTION
/dev/console, /dev/con1, /dev/con2, ..., are special files
which, when opened, give access to a screen which will
appear to be an ANSI-compatibile terminal. If there already
exists a screen corresponding to the opened name, fd will
refer to it, otherwise fd refers to a newly created screen.
This screen is a tty device as described in termios(7), and
may be used as a login terminal or for any purpose for which
a display terminal is normally used. It is also a streams
device and is suitable for streams functions described in
streamio(7). When a new console screen is created, it is
not displayed by default. Before it is displayed, certain
parameters such as graphics modes and pixel resolution may
be specified using the SIOCSETTYPE ioctl (see screen(7A)).
Once a console screen has been written to or displayed, its
graphics modes and resolution are fixed until it is closed.
A console screen is a "virtual" screen, meaning that it can
be accessed without regard to the existence of other
screens, and regardless of whether it is being displayed at
the moment. There can exist many screens, some of which
might be other similar console screens, and the user can
select which one is "active" using the keyboard or mouse
(currently only the ALT-function-key selection method is
supported). Read and write system calls are used to do I/O
to the screen as with any termios device. Input will be
codes from the ASCII/ISO character set, possibly including
ANSI control sequences representing special keys such as the
arrow keys and function keys. Output is displayed as
ASCII/ISO characters with ANSI control sequences interpreted
for such functions as cursor positioning, attribute setting
and insertion/deletion. See the terminfo entry for `amiga'
for a description of the codes recognized. When the console
screen is closed using the close(2) or _exit(2) system
calls, and no process has that console screen open, the
screen will cease to exist and its memory will be released
for use by other programs. One exception to this is
/dev/console,theconsolescreenwhich it is starting up. This
screen will never go away unless no process has it open and
the HUPCL bit is turned on in its termios parameters. Even
if it does go away, it will come back any time the Unix ker-
nel needs to display a message. In addition, /dev/console's
screen will "pop to the front" of other screens (force
itself to be displayed) in the case of a kernel "panic"
Amiga Unix Last change: PRELIMINARY 1
CONSOLE(7A) MISC. REFERENCE MANUAL PAGES CONSOLE(7A)
(when a fatal error has occurred and the system is stop-
ping). Console screens use the Amiga's "chip" memory, the
special 16-bit wide memory that is accessible by the graph-
ics custom chips. This memory is not virtual, so the number
of screens that can exist at one time is limited by the
amount of chip memory in the system. This is usually 512K
to 2M bytes.
IOCTL COMMANDS
In addition to the functions described in termios(7) and
streamio(7), the console device supports the following ioctl
commands from screen(7A):
SIOC, SIOCDISPLAYTYPE, SIOCFRONT, SIOCBACK, SIOCAC-
TIVATE, SIOCSETKMAP, SIOCGETKMAP, SIOCSETDEFKMAP,
SIOCSETFONT, SIOCGETFONT, SIOCSETDEFFONT, SIOCSETTYPE,
SIOCGETTYPE, SIOCWINSIZE, SIOCSETDISPLAYTYPE.
BUGS
Multiple bitplanes are permitted but ignored (only bitplane
zero is ever modified).
ECS modes are not supported yet.
FILES
/dev/console, /dev/term/con[1-9] - special files for access-
ing console screens
SEE ALSO
open(2), close(2), ioctl(2), read(2), write(2), termios(7),
streamio(7), amiga(7A), screen(7A).
Amiga Unix Last change: PRELIMINARY 2