Emu
provides the Inferno emulation environment.
The emulator runs as an application under the
machine's native operating system, and
provides system services and a Dis virtual machine for Inferno applications.
Emu
starts an Inferno initialisation program
/dis/emuinit.dis,
whose path name is interpreted in the
Inferno file name space,
not in
the native operating system's name space.
It in turn invokes the shell
/dis/sh.dis
by default or the optional
cmd
and its arguments.
If the
-d
option is specified,
emu
instead invokes
daemon,
turning the
emu
instance into an Inferno service process on the network,
running the given
daemon
service or services.
The emulator supports the following options:
- -cn
- Unless specified otherwise by the module (see
wm/rt
in
wm-misc(1)),
emu
uses an interpreter to execute Dis instructions.
Setting
n
to 1 (the default value is 0)
makes the default behaviour
to compile Dis
into native instructions when a module is loaded,
resulting in faster execution but larger run-time size.
Setting
n
to values larger than 1 enables increasingly detailed traces of the compiler.
- -d daemon
- Run
emu
as a server, invoking
daemon
instead of
/dis/emuinit.dis,
and disabling
input from
cons
(see
cons(3)).
- -gXsizexYsize
- Define screen width and height in pixels.
The default values are 640x480 and the minimum values are 64x48.
Values smaller than the minimum or greater than the
available display size are ignored.
- -ffont
- Specify the default font for the
tk
module.
The path is interpreted in the Inferno name space.
If unspecified, the
font
variable has value
/fonts/lucm/unicode.9.font.
- -rrootpath
- Specify the host system directory that
emu
will serve as its root.
The default value is
/usr/inferno
on most systems, but
\inferno
on Windows.
- -s
- Specify how the emulator deals with traps reported by the operating system.
By default, they suspend execution of the offending thread within the virtual machine
abstraction.
The
-s
option causes
emu
itself to trap, permitting debugging of the
broken host operating system process that results when a trap occurs.
(This is intended to allow debugging of
emu,
not Inferno applications.)
- -ppool=maxsize
- Specify the maximum size in bytes of the named memory allocation pool.
The pools
are:
- main
- the general malloc arena
- heap
- the Dis virtual machine heap
- image
- image storage for the display
- -7
- When host graphics is provided by X11, request a 7-bit colour map;
use this option only if X11 refused to allow
emu
to configure the normal (default) 8-bit Inferno colour map.
- -C channel
- Use the given channel for the display if possible. For example, k8 gives
8 bit greyscale. See
image(6)
for the full range of channel descriptors.
- -S
- Force stylus input behaviour for Tk mouse events:
motion events are received only when a button is down
(just as a stylus produces no events until it touches the screen).
This option only affects the behaviour of Tk mouse events, it does not
affect the behaviour of
/dev/pointer
as described in
cons(3).
- -v
- Print version data: edition and revision date.
Options may also be set in the host operating system's environment variable
EMU;
they are overridden by options supplied on the command line.
Emu
finds the host system directory that will serve as its Inferno root directory
as the last value found as follows:
it is the value built-in to the executable, by default; or
the value of the host system's environment variable
INFERNO;
or the value of the environment variable
ROOT;
or the value of a
-r
option in the environment variable
EMU;
or the
rootpath
set by a
-r
option to the
emu
command itself.