aboutsummaryrefslogtreecommitdiff
path: root/src/tools/build.zc
blob: 547b70f55893d559940500890998706723d83b06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// compiles the rest of stdin (after the backtick) as a genome image at GORG
// and writes it to stdout as little-endian 64-bit words.
docs on;
// writes the compiled genome image to stdout as little-endian 64-bit words.
int main() {
	int n = build_image_grow(GORG, 4096), i = 0, w;
	while (i < n) {
		w = image_words[i];
		put_c(w); put_c(w >> 8); put_c(w >> 16); put_c(w >> 24);
		put_c(w >> 32); put_c(w >> 40); put_c(w >> 48); put_c(w >> 56);
		i++;
	}
	return 0;
}