added cabal build system
This commit is contained in:
14
app/Main.hs
Normal file
14
app/Main.hs
Normal file
@@ -0,0 +1,14 @@
|
||||
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 ()
|
||||
Reference in New Issue
Block a user