I’m developing on NixOS, so this all starts with a nix-shell
:
nix-shell -p binutils clojure
Run the ./bin/test-sybilant
script:
[nix-shell:~/src/sybilant]$ ./bin/test-sybilant == Sybilant tests syscall.syb.asm...passed (0:00.00) == Testing complete
Run the ./bin/test-clojure
script:
[nix-shell:~/src/sybilant]$ ./bin/test-clojure Running tests in #{"clojure/test"} Testing sybilant.compile-test Ran 1 tests containing 1 assertions. 0 failures, 0 errors.
Run the sybilant.compile/-main
function using clojure
passing in one or more files and the
resulting assembly will print to stdout:
clojure -M -m sybilant.compile [FILE]...
For example, to compile sybilant/test/syscall.syb
:
[nix-shell:~/src/sybilant]$ clojure -M -m sybilant.compile sybilant/test/syscall.syb .text .global _start _start: movl $1, %eax movl $0, %ebx int $0x80