EM_B(6)

NAME
em_b - ACK B compiler

SYNOPSIS
~em/lib/ack/em_b [options]

DESCRIPTION
em_b is a port of the ABC B compiler to the ACK. Interested parties will be interested in the upstream distribution here:

https://github.com/aap/abc

However, the version here has been heavily modified — bug reports should be filed with the ACK, not with the upstream compiler.

Since B was designed for machines with word addressing, some hacking is required to make it work on modern, byte addressed machines. The generated code expects B variables to contain word addresses, and then generates code to transform these into native addresses before use (which, unfortunately, impacts performance). However, the ACK's linker doesn't know how to emit word addresses into the program's data sections, and so a separate fixup stage has to happen at runtime, just before main(), to convert the byte addresses into word addresses.

The end result is that using multiple source files with B is somewhat unwieldy, requiring each module to be explicitly named and then an extra stage to generate the fixup code. See the ack(1) and abmodules(1) for details.

OPTIONS
em_b accepts the following flags:

-w size
    Sets the word size, used for scaling addresses. Usually either 2 or 4.

-B name
    Sets the name of the module currently being compiled (used to generate the fixup table symbol name). Defaults to main if not specified.

-i filename
    The source B file.

-o filename
    The output compact EM bytecode file.

SEE ALSO
ack(1), abmodules(1)

REMARKS
It is very unlikely the em_b will ever be useful for anything.