OBC(1)

NAME
obc - Oberon-2 compiler

SYNOPSIS
obc [options] file ...

DESCRIPTION
Obc is the Oxford Oberon compiler. It translates source files written in a language that is almost (but not quite) Oberon-2, translates them into a portable bytecode form, and links the bytecode with library code to produce an executable program. Files with extension .m are assumed to contain the source code of Oberon-2 modules. They are translated into bytecodes before linking. Files with extension .k are assumed to be bytecode files produced by earlier compilations. These bytecode files also contain interface information about the module that is used in compiling other modules that import it. All the files named on the command line are linked to form an executable program, unless the -c option is specified. When the program is executed, the bodies of each module are executed in the order they appeared on the obc command line; thus each module should be listed before other modules that import it. Bytecode and executable files produced by the compiler are machine-independent. The same executable can be run without change on multiple machines of different architectures, provided the Oberon run-time system has been installed appropriately on all of them.

OPTIONS

-b  Suppress the usual run-time checks, sacrificing safety for the sake of screaming speed.

-c  Omit the linking step, and simply compile all arguments ending in .m into bytecode.

-C  Link in the bytecode interpreter directly during the linking phase, rather than finding it at runtime. This makes the executable larger, but makes it independent, and enables undocumented features for calling C code from Oberon. (Not available under Windows.)

-o file
    Place the output of the linking step on file, instead of the default a.out. (Under Windows, the default is aout.exe.)

-O  Use an optimizer to pack the bytecode, resulting in faster and more compact code. (This is the default.)

-O- Turn off the optimizer.

-pl Generate instructions for line-count profiling.

-v  Show version information for all parts of the Oberon system, and print the compiling commands as they are executed.

FILES

file.m
    Oberon-2 source text

file.k
    Bytecode and interface definition

/usr/local/lib/obc/obx
    Runtime system

/usr/local/lib/obc/*.m
    Library sources

BUGS
The language accepted by the compiler has some differences from that described in the Oberon-2 report. Ask the author for details.

AUTHOR
Mike Spivey