Artifacts
The .bc text format, and how to read one by eye.
The format
BloodCode artifacts are text. One op per line: tag|arg0|arg1. A block line opens a cell; end closes it. The empty literal is _.
block|main|0 pulse|5|0 pulse|6|0 combine|_|0 signal|_|0 output|_|0 end||0
The header
A module header records its name and version: decl|Name|1. Links merge modules; the entry cell and closure resolve at link time.
Reading it by eye
Because it is text, you can open any artifact in an editor and read exactly what your program became. That is deliberate: the machine is inspectable down to the instruction.
Modules (4.0)
4.0 has two kinds of compiled files. A .bc is what sanguis bleed writes. It's plain text, and it's what the fixed point compares byte for byte.
A module (.mod) holds system cells. BLOB1 says how many bytes of code there are, BLOBOFF says where each cell starts, and BLOB2 is the machine code in hex. To use one, read it, map it and call it. The kit comes with two working loaders, blobrun.c and shade.c.