diff options
| author | hachem <im@hachem.wtf> | 2025-12-06 09:14:34 +0100 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-12-06 09:14:34 +0100 |
| commit | a52678034edaf8f2a27e3341845e2f8ec2fd9013 (patch) | |
| tree | b38e4533535845cedef45e4cb0b241e68b60b910 /src/Day2.asm | |
| parent | c7466e7191f7f29c4b94bc07a72a66f7dc57109f (diff) | |
[setup]: x86 -> x64
Diffstat (limited to 'src/Day2.asm')
| -rw-r--r-- | src/Day2.asm | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Day2.asm b/src/Day2.asm index d524d7c..7e154da 100644 --- a/src/Day2.asm +++ b/src/Day2.asm @@ -1,9 +1,12 @@ ; Advent of Code 2025 - Day 2 +bits 64 +default rel + global _start -%define SYS_EXIT 1 -%define SYS_WRITE 4 +%define SYS_EXIT 60 +%define SYS_WRITE 1 %define STDOUT 1 @@ -13,12 +16,12 @@ section .data section .text _start: - mov eax, SYS_WRITE - mov ebx, STDOUT - mov ecx, message - mov edx, length - int 0x80 + mov rax, SYS_WRITE + mov rdi, STDOUT + mov rsi, message + mov rdx, length + syscall - mov eax, SYS_EXIT - xor ebx, ebx - int 0x80 + mov rax, SYS_EXIT + xor rdi, rdi + syscall |
