[manual index][section index]

NAME

emu - Inferno emulator (hosted Inferno)

SYNOPSIS

emu [ -g Xsize x Ysize ] [ -cn ] [ -d daemon ] [-s] [ -p pool=maxsize ] [ -f font ] [ -r rootpath ] [-7] [ -C channel ] [ -S ] [ -v ] [ cmd [ arg ... ] ]

DESCRIPTION

Emu provides the Inferno emulation environment, otherwise known as `hosted Inferno'. 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. See image(6) for the full range of channel descriptors. For example, k8 gives 8 bit greyscale, and x8r8g8b8 gives 24 bit colour on a PC. The set of channels supported is platform-dependent.
-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.

Emu sets several Inferno environment variables:


cputype
host processor architecture: 386 (for any x86), arm, mips, power (any Power or PowerPC), sparc, and spim (little-endian MIPS).
emuargs
arguments with which emu was invoked
emuhost
host operating system type, such as: FreeBSD, Irix, Linux, MacOSX, NetBSD, Nt (used for Windows generally), OpenBSD, Plan9, Solaris and Unixware.
emuroot
name of directory in host file system that acts as Inferno's root directory
emuwdir
name in host file system of directory where emu was invoked

EXAMPLE

To start wm/logon directly:

EMU='-g800x600 -c1'
emu /dis/wm/wm.dis wm/logon -u inferno

FILES

/dis/emuinit.dis
The default initialisation program.
/dis/sh.dis
The default Inferno shell.

SOURCE

/emu

SEE ALSO

limbo(1), wm-misc(1)

EMU(1E ) Rev:  Tue Mar 31 02:42:38 GMT 2015