EMU(1E)
NAME
emu − Inferno emulator
SYNOPSIS
emu [ −gXsizexYsize ] [ −c[0-9] ] [ −d[012] ] [ −m[0-9] ] [−s] [ −ppool=maxsize ] [ −ffont ] [ −rrootpath ] [−7] [−2] [−d] [ cmd [ arg ... ] ]
DESCRIPTION
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 /dis/lib/srv.dis, turning the emu instance into an Inferno service process on the network (see srv(8)).
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.
−gXsizexYsize
Define screen width and height in pixels. The default values are 640 and 480 respectively. Values smaller than the defaults are disallowed.
−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 \users\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.
−2 Use greyscale (Windows only).
Options may also be set in the host operating system’s environment variable EMU; they are overridden by options supplied on the command line.
EXAMPLE
To start wm/logon directly:
EMU=’-g800x600 -c1’ emu /wm/logon.dis -u inferno
FILES
/dis/emuinit.dis
The default initialisation program.
/dis/sh.dis
The default Inferno shell.
SOURCE
/emu