removed (this isn't C, after all)
This commit is contained in:
@@ -92,13 +92,6 @@ handleSymbol h (ZorthASTWord "/") = do
|
|||||||
\ push rax\n"
|
\ push rax\n"
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
handleSymbol h (ZorthASTWord "ret") = do
|
|
||||||
liftIO $ hPutStr h
|
|
||||||
" mov rax,60\n\
|
|
||||||
\ mov rdi,0\n\
|
|
||||||
\ syscall\n"
|
|
||||||
return ()
|
|
||||||
|
|
||||||
handleSymbol h (ZorthASTWord "dup") = do
|
handleSymbol h (ZorthASTWord "dup") = do
|
||||||
liftIO $ hPutStr h
|
liftIO $ hPutStr h
|
||||||
" pop rax\n\
|
" pop rax\n\
|
||||||
@@ -138,6 +131,10 @@ handleSymbol h (ZorthASTWord "=") = do
|
|||||||
liftIO $ truthOperator h "sete"
|
liftIO $ truthOperator h "sete"
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
|
handleSymbol h (ZorthASTWord "/=") = do
|
||||||
|
liftIO $ truthOperator h "setne"
|
||||||
|
return ()
|
||||||
|
|
||||||
handleSymbol h (ZorthASTWord ">") = do
|
handleSymbol h (ZorthASTWord ">") = do
|
||||||
liftIO $ truthOperator h "setg"
|
liftIO $ truthOperator h "setg"
|
||||||
return ()
|
return ()
|
||||||
@@ -224,3 +221,6 @@ compileZorth _ [] = return ()
|
|||||||
compileZorth h xs = do
|
compileZorth h xs = do
|
||||||
forthPrelude h
|
forthPrelude h
|
||||||
compileZorthAST h xs $ Environment 0 M.empty
|
compileZorthAST h xs $ Environment 0 M.empty
|
||||||
|
hPutStr h " mov rax,60\n\
|
||||||
|
\ mov rdi,0\n\
|
||||||
|
\ syscall\n"
|
||||||
@@ -23,5 +23,3 @@ while
|
|||||||
fi
|
fi
|
||||||
1+
|
1+
|
||||||
repeat
|
repeat
|
||||||
|
|
||||||
ret
|
|
||||||
@@ -16,5 +16,3 @@
|
|||||||
;
|
;
|
||||||
|
|
||||||
15 fib
|
15 fib
|
||||||
|
|
||||||
ret
|
|
||||||
|
|||||||
Reference in New Issue
Block a user