blob: b0e3da07ced14cc8694740f0b0570ebcec677879 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
namespace;
include rt, run;
// 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 = run.build_image_grow(rt.GORG, 4096), i = 0, w;
while (i < n) {
w = run.image_words[i];
rt.put_c(w); rt.put_c(w >> 8); rt.put_c(w >> 16); rt.put_c(w >> 24);
rt.put_c(w >> 32); rt.put_c(w >> 40); rt.put_c(w >> 48); rt.put_c(w >> 56);
i++;
}
return 0;
}
|