summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2025-02-01 23:25:40 +0000
committerAda Christine <adachristine18@gmail.com>2025-02-01 23:25:40 +0000
commit3d806c9e2fcb6226915982b6514919a3b9dac4dc (patch)
treecae747e3a5c6e31f89069e0ba1a7ae90cc4b85d9 /service
parentf76631c47b92b0778b1073bcab55dc1240422f20 (diff)
write syscall functions
Diffstat (limited to 'service')
-rw-r--r--service/lib/posix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/service/lib/posix.c b/service/lib/posix.c
index a912977..9a3e70f 100644
--- a/service/lib/posix.c
+++ b/service/lib/posix.c
@@ -5,10 +5,10 @@ ssize_t write(int fd, const void *buffer, size_t length)
ssize_t result;
__asm__ (
- "movq %0, %%rdi\n"
- "movq %1, %%rsi\n"
- "movq %2, %%rdx\n"
- "movq $1, %%rax\n"
+ "movq %1, %%rdi\n"
+ "movq %2, %%rsi\n"
+ "movq %3, %%rdx\n"
+ "movq %0, %%rax\n"
"syscall"
: "=a"(result)
: "g"(fd), "g"(buffer), "g"(length)