OBC is a B compiler for i386 and x86-64 written in C.
OBC compiles directly from source code to machine code without any intermediate representation or assembler. I aim to keep the source code of OBC (at least reasonably) easy to read and understand, but it's not quite didactic.
OBC is free software under the GNU GPLv3.