aboutsummaryrefslogtreecommitdiff
path: root/docs/history/10-zc/code/tools/build.zc
blob: afa1626c87a4afa9328a1d0aa97b8394862a6228 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// compiles the rest of stdin (after the backtick) as a genome image at GORG
// and writes it to stdout as little-endian 32-bit words.
const OUT = 0x10000;
fn main()
{
	var n = build_image(GORG, OUT), i = 0, w;
	while (i < n) {
		w = OUT[i];
		putc(w); putc(w >> 8); putc(w >> 16); putc(w >> 24);
		i++;
	}
	return 0;
}