aboutsummaryrefslogtreecommitdiff
path: root/examples/greet_from_library/Library.asm
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-02-07 12:26:07 +0000
committerFuwn <[email protected]>2025-06-09 07:46:03 +0000
commit4ace7cad20545d585d2ce8c5e93e4dc43358801b (patch)
tree043b73bdd939f955f2b4d1e6309c8b697d6e0544 /examples/greet_from_library/Library.asm
downloaddivina-4ace7cad20545d585d2ce8c5e93e4dc43358801b.tar.xz
divina-4ace7cad20545d585d2ce8c5e93e4dc43358801b.zip
feat(divina): pre-release :star:
Diffstat (limited to 'examples/greet_from_library/Library.asm')
-rw-r--r--examples/greet_from_library/Library.asm15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/greet_from_library/Library.asm b/examples/greet_from_library/Library.asm
new file mode 100644
index 0000000..a23acf3
--- /dev/null
+++ b/examples/greet_from_library/Library.asm
@@ -0,0 +1,15 @@
+global library_perform
+extern printf
+
+section .rodata
+message: db "Hello World!", 13, 10, 0
+
+section .text
+library_perform:
+ sub rsp, 8
+ sub rsp, 32
+ mov rcx, qword message
+ call printf
+ add rsp, 32
+
+ ret