diff --git a/2024-07-27-sys-write-string.md b/2024-07-27-sys-write-string.md index 2304fbb..0fe08e4 100644 --- a/2024-07-27-sys-write-string.md +++ b/2024-07-27-sys-write-string.md @@ -12,7 +12,7 @@ An approachable way for beginners to understand how syscalls are made in Linux i Looking at that table, it can be concluded the following registers need to be populated: -- `rdi` → the call identifier. for `sys_write`, it's `1` from reading the first column of that table +- `rax` → the call identifier. for `sys_write`, it's `1` from reading the first column of that table - `rdi` → file descriptor, `1` being for `stdout` - `rsi` → contents of buffer (i.e. the string) - `rdx` → length of the buffer for stdout @@ -23,7 +23,7 @@ The first step is to define the `.data` section and initialize memory for `rsi`. The syntax looks like this: -`0xa` is just the ASCII hex representation of a new line. +`0x0a` is just the ASCII hex representation of a new line. ``` ; sys_write_string.asm