Files
zorth/app/Main.hs
2025-09-06 02:53:54 +01:00

14 lines
349 B
Haskell

module Main where
import Parser
import Compiler
import System.Process
import System.IO
main :: IO ()
main = do
contents <- getContents
withFile "out.asm" WriteMode (\f -> compileZorth f $ parseZorth contents)
readProcess "nasm" ["-f", "elf64", "out.asm", "-o", "out.o"] ""
readProcess "ld" ["out.o", "-o", "a.out"] ""
return ()