1
0
mirror of https://github.com/janet-lang/janet synced 2025-07-05 11:32:54 +00:00
janet/examples/sysir/hello.janet
2025-04-13 07:47:52 -05:00

17 lines
298 B
Plaintext

(use ./frontend)
(defn-external printf:int [fmt:pointer])
(defn-external exit:void [x:int])
(defsys _start:void []
(printf "hello, world!\n")
(exit (the int 0))
(return))
(defn main [& args]
(def [_ what] args)
(eprint "MODE: " what)
(case what
"c" (dumpc)
"x64" (dumpx64)))