diff options
Diffstat (limited to 'src/tools/build.zc')
| -rw-r--r-- | src/tools/build.zc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/build.zc b/src/tools/build.zc new file mode 100644 index 0000000..547b70f --- /dev/null +++ b/src/tools/build.zc @@ -0,0 +1,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; +} |
