wikibooks (Scroll down to "Via interrupt") Have an Assembly x86 wiki which shows us registers mapping for system calls, and we can see that eax is the syscall numeric value, and ebx is the first parameter, etc.
Do we always need to use this order for syscalls? and where can I find the exact page but for x86_64 assembly (which have different registers)?
mov rax, 1 ; write(
mov rdi, 1 ; STDOUT_FILENO,
mov rsi, msg ; "Hello, world!\n",
mov rdx, msg_len ; sizeof("Hello, world!\n")
syscall ; );