diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.go b/src/main.go index 475e6a7..e9c844c 100644 --- a/src/main.go +++ b/src/main.go @@ -32,8 +32,8 @@ func readfile(path string) []string { func compile(raw[]string) { var iflabels[] int; - print(" section .text") - print(" global _start") + print("section .text") + print("global _start") print("_start:") for i := 0; i < len(raw); i++ { @@ -84,10 +84,9 @@ func compile(raw[]string) { default: panic("invalid word") } - } - print(" ;; RETURN") + print(" ;; EXIT") print(" mov rdi, 0") print(" mov rax, 60") print(" syscall") |