diff options
author | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-31 02:46:16 +0330 |
---|---|---|
committer | A404M <ahmadmahmoudiprogrammer@gmail.com> | 2025-01-31 02:46:16 +0330 |
commit | 5a6f4613ab19a9c4bc9ead53da410d7ab9ff5837 (patch) | |
tree | 64053302ea59ac69fb830b3efad6a721cdd1e9b3 /stdlib/main.asm | |
parent | ce253ec2ae45879b331d9b9f77f786b78fbfcf2e (diff) |
make stuff more organized and safer
Diffstat (limited to 'stdlib/main.asm')
-rw-r--r-- | stdlib/main.asm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/stdlib/main.asm b/stdlib/main.asm index 9a78d8e..efa7ba0 100644 --- a/stdlib/main.asm +++ b/stdlib/main.asm @@ -4,6 +4,16 @@ SYS_exit = 60 SYS_write = 1 STDOUT = 1 +macro mov64 dest, src { + mov rax, src + mov dest, rax +} + +macro def64 name, value { +name: + dq value +} + segment readable executable entry _start @@ -38,4 +48,3 @@ mov rax, SYS_exit xor rdi,rdi syscall -segment readable executable writable |