diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.go b/src/main.go index b850c8c..183cb84 100644 --- a/src/main.go +++ b/src/main.go @@ -174,9 +174,14 @@ func compile(raw[]string) { print(" syscall") case "println": - /*printout the last element without poping it - the difference between dump is println also prints strings*/ - panic("println: not implemented") + print(" ;; PRINTLN") + print(" pop rsi") + print(" pop rdx") + print(" mov rdi, 1") + print(" mov rax, 1") + print(" syscall") + print(" push rsi") + print(" push rdx") default: panic("invalid word") |