From 1286e82c7b91053cf77fbd334d96fbb7d611cf8c Mon Sep 17 00:00:00 2001 From: 0x3bb <0x3bb@3bb.io> Date: Sat, 27 Jul 2024 20:04:06 +0000 Subject: [PATCH] Update 2024-07-27-sys-write-string.md --- 2024-07-27-sys-write-string.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2024-07-27-sys-write-string.md b/2024-07-27-sys-write-string.md index 244457a..2304fbb 100644 --- a/2024-07-27-sys-write-string.md +++ b/2024-07-27-sys-write-string.md @@ -8,7 +8,7 @@ I'm reading a book on x86-64 NASM. One of the exercises involves printing a string to stdout by leveraging a Linux syscall called `sys_write`, but doesn't mention the reasoning behind the `mov` instructions into the registers or how they're used once you make the syscall. -An approachable way for beginners to understand how syscalls are made in Linux is referring to the [Linux System Call Table](https://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/). It documents each parameter and which in which specific register it expects to find it. +An approachable way for beginners to understand how syscalls are made in Linux is referring to the [Linux System Call Table](https://blog.rchapman.org/posts/Linux_System_Call_Table_for_x86_64/). It documents each parameter and in which specific register it expects to find it. Looking at that table, it can be concluded the following registers need to be populated: