summaryrefslogtreecommitdiff
path: root/loop.asm
diff options
context:
space:
mode:
Diffstat (limited to 'loop.asm')
-rw-r--r--loop.asm19
1 files changed, 19 insertions, 0 deletions
diff --git a/loop.asm b/loop.asm
new file mode 100644
index 0000000..fd0ee0e
--- /dev/null
+++ b/loop.asm
@@ -0,0 +1,19 @@
+global main
+
+extern printf
+
+section .data
+ msg db "cheese ", 0
+
+section .text
+
+main:
+ sub rsp, 8
+.print
+ lea rdi, [rel msg]
+ call printf wrt ..plt
+ jmp .print
+ mov eax, 0
+ add rsp, 8
+ ret
+