# x86-64 Syscalls

[x86-64 Documentation](https://asm-editor.specy.app/documentation/x86.md)

Web page: https://asm-editor.specy.app/documentation/x86/syscall

The Linux calls this emulator implements, with register inputs, results, C wrapper names, and program arguments. Errors return as negative values in `rax`.

147 entries, each with its own page of markdown:

- [The ones to start with](https://asm-editor.specy.app/documentation/x86/syscall/common.md): A program uses the Linux x86-64 syscall convention implemented by this emulator.
- [`write`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-write.md) `rax = 1`: Writes rdx bytes from the buffer at rsi to the file descriptor in rdi, and returns how many it wrote.
- [`read`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-read.md) `rax = 0`: Reads up to rdx bytes from the file descriptor in rdi into the buffer at rsi, and returns how many it read.
- [`exit`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-exit.md) `rax = 60`: Ends the program with the status in rdi.
- [`exit_group`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-exit_group.md) `rax = 231`: Ends every thread of the program with the status in rdi.
- [`open`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-open.md) `rax = 2`: Opens the path at rdi with the flags in rsi and, when creating, the mode in rdx.
- [`close`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-close.md) `rax = 3`: Closes the file descriptor in rdi.
- [`lseek`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-lseek.md) `rax = 8`: Moves the read and write position of the descriptor in rdi to the offset in rsi, interpreted according to rdx, and returns the new position.
- [`fstat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fstat.md) `rax = 5`: Reads file metadata for the descriptor in rdi and writes it to the Linux struct stat buffer at rsi.
- [`mmap`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-mmap.md) `rax = 9`: Maps memory: the length in rsi, the protection in rdx, the flags in r10.
- [`munmap`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-munmap.md) `rax = 11`: Unmaps the mapping of rsi bytes at the address in rdi.
- [`nanosleep`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-nanosleep.md) `rax = 35`: Sleeps for the interval at rdi, a pair of seconds and nanoseconds.
- [`clock_gettime`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-clock_gettime.md) `rax = 228`: Writes the clock selected by rdi to the timespec structure at rsi (seconds and nanoseconds).
- [`getpid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getpid.md) `rax = 39`: Returns the process id.
- [Everything this emulator implements](https://asm-editor.specy.app/documentation/x86/syscall/all.md): Every call the emulator implements is listed here.
- [`stat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-stat.md) `rax = 4`: Reads file metadata for the path at rdi and writes it to the Linux struct stat buffer at rsi.
- [`lstat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-lstat.md) `rax = 6`: Like stat, but reports a symbolic link itself instead of the file it points to.
- [`poll`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-poll.md) `rax = 7`: Waits for the pollfd array at rdi to report requested events, checking rsi entries for up to rdx milliseconds.
- [`mprotect`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-mprotect.md) `rax = 10`: Changes the read, write, or execute permissions of the rsi bytes starting at the page-aligned address in rdi.
- [`brk`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-brk.md) `rax = 12`: Sets the end address of the heap area.
- [`rt_sigaction`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rt_sigaction.md) `rax = 13`: Takes signal in rdi, i_hand in rsi, o_hand in rdx, byte count in r10.
- [`rt_sigprocmask`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rt_sigprocmask.md) `rax = 14`: Takes sighow in rdi, i_sigset in rsi, o_sigset in rdx, byte count in r10.
- [`rt_sigreturn`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rt_sigreturn.md) `rax = 15`: Returns from a signal handler: restores the registers and the signal mask saved when the signal arrived, and carries on where the program was interrupted.
- [`ioctl`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-ioctl.md) `rax = 16`: Asks a device the descriptor in rdi refers to for something outside the ordinary read and write interface, chosen by the request in rsi.
- [`pread64`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pread64.md) `rax = 17`: Takes file descriptor in rdi, buffer (written by the kernel) in rsi, byte count in rdx, offset in r10.
- [`pwrite64`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pwrite64.md) `rax = 18`: Takes file descriptor in rdi, buffer (read by the kernel) in rsi, byte count in rdx, offset in r10.
- [`readv`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-readv.md) `rax = 19`: Reads into the buffers listed by the iovec array at rsi, with rdx entries, from the descriptor in rdi; returns the total bytes read.
- [`writev`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-writev.md) `rax = 20`: Writes the buffers listed by the iovec array at rsi, with rdx entries, to the descriptor in rdi; returns the total bytes written.
- [`access`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-access.md) `rax = 21`: Takes path in rdi, accmode in rsi.
- [`pipe`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pipe.md) `rax = 22`: Creates a pair of connected file descriptors and writes both integers to the two-element array at rdi; reads from one end receive bytes written to the other.
- [`select`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-select.md) `rax = 23`: Takes the descriptor limit in rdi, pointers to the read, write, and exception sets in rsi, rdx, and r10, and an optional timeout in r8.
- [`sched_yield`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sched_yield.md) `rax = 24`: Takes no arguments.
- [`mremap`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-mremap.md) `rax = 25`: Takes oldaddress (written by the kernel) in rdi, oldsize in rsi, newsize in rdx, flags in r10, newaddress (written by the kernel) in r8.
- [`msync`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-msync.md) `rax = 26`: Takes address (written by the kernel) in rdi, size in rsi, flags in rdx.
- [`madvise`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-madvise.md) `rax = 28`: Takes address (written by the kernel) in rdi, size in rsi, advice in rdx.
- [`dup`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-dup.md) `rax = 32`: Returns a new file descriptor that refers to the same open file description as the descriptor in rdi.
- [`dup2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-dup2.md) `rax = 33`: Makes descriptor rsi refer to the same open file description as rdi, closing the old rsi first if needed.
- [`pause`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pause.md) `rax = 34`: Takes no arguments.
- [`getitimer`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getitimer.md) `rax = 36`: Writes the remaining delay and repeat interval of the timer selected by rdi to the itimerval structure at rsi.
- [`alarm`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-alarm.md) `rax = 37`: Takes int in rdi.
- [`setitimer`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setitimer.md) `rax = 38`: Sets the timer selected by rdi from the itimerval structure at rsi, and writes the previous settings at rdx when that pointer is nonzero.
- [`sendfile`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sendfile.md) `rax = 40`: Copies up to r10 bytes from the input descriptor in rsi to the output descriptor in rdi, optionally updating the input position through the pointer in rdx.
- [`wait4`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-wait4.md) `rax = 61`: Returns -ECHILD immediately because this environment has no child processes.
- [`kill`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-kill.md) `rax = 62`: Takes process id in rdi, signal in rsi.
- [`uname`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-uname.md) `rax = 63`: Writes system name and version fields to the Linux struct utsname buffer at rdi.
- [`fcntl`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fcntl.md) `rax = 72`: Takes file descriptor in rdi, wat_fcntl in rsi, un in rdx.
- [`flock`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-flock.md) `rax = 73`: Takes value in rdi, value in rsi.
- [`fsync`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fsync.md) `rax = 74`: Takes file descriptor in rdi.
- [`fdatasync`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fdatasync.md) `rax = 75`: Takes file descriptor in rdi.
- [`truncate`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-truncate.md) `rax = 76`: Takes string in rdi, offset in rsi.
- [`ftruncate`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-ftruncate.md) `rax = 77`: Takes file descriptor in rdi, offset in rsi.
- [`getcwd`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getcwd.md) `rax = 79`: Writes the current working directory as a NUL-terminated path to the buffer at rdi, up to rsi bytes.
- [`chdir`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-chdir.md) `rax = 80`: Changes the program’s current working directory to the path at rdi.
- [`fchdir`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fchdir.md) `rax = 81`: Changes the program’s current working directory to the directory referred to by descriptor rdi.
- [`rename`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rename.md) `rax = 82`: Renames or moves the path at rdi to the path at rsi.
- [`mkdir`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-mkdir.md) `rax = 83`: Makes a directory at the path in rdi, with the mode in rsi.
- [`rmdir`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rmdir.md) `rax = 84`: Removes the empty directory named by the path at rdi.
- [`creat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-creat.md) `rax = 85`: Takes path in rdi, mode in rsi.
- [`link`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-link.md) `rax = 86`: Takes path in rdi, path in rsi.
- [`unlink`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-unlink.md) `rax = 87`: Removes the directory entry named by the path at rdi; an open file remains available through its descriptor.
- [`symlink`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-symlink.md) `rax = 88`: Takes path in rdi, path in rsi.
- [`readlink`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-readlink.md) `rax = 89`: Takes path in rdi, buffer (written by the kernel) in rsi, byte count in rdx.
- [`chmod`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-chmod.md) `rax = 90`: Takes path in rdi, mode in rsi.
- [`fchmod`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fchmod.md) `rax = 91`: Takes file descriptor in rdi, uid in rsi.
- [`chown`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-chown.md) `rax = 92`: Takes path in rdi, uid in rsi, gid in rdx.
- [`fchown`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fchown.md) `rax = 93`: Takes file descriptor in rdi, uid in rsi, gid in rdx.
- [`lchown`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-lchown.md) `rax = 94`: Takes path in rdi, uid in rsi, gid in rdx.
- [`umask`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-umask.md) `rax = 95`: Takes mode in rdi.
- [`gettimeofday`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-gettimeofday.md) `rax = 96`: Writes calendar time since the Unix epoch, in seconds and microseconds, to the timeval structure at rdi.
- [`getrlimit`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getrlimit.md) `rax = 97`: Takes resource in rdi, o_rlimit in rsi.
- [`getrusage`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getrusage.md) `rax = 98`: Writes resource-usage counters for the selected process or children to the rusage structure at rsi.
- [`sysinfo`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sysinfo.md) `rax = 99`: Writes the emulator’s uptime, memory, and process-count values to a Linux struct sysinfo buffer at rdi.
- [`times`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-times.md) `rax = 100`: Takes buffer (written by the kernel) in rdi.
- [`ptrace`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-ptrace.md) `rax = 101`: Takes value in rdi, value in rsi, value in rdx, value in r10.
- [`getuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getuid.md) `rax = 102`: Takes no arguments.
- [`getgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getgid.md) `rax = 104`: Takes no arguments.
- [`setuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setuid.md) `rax = 105`: Takes uid in rdi.
- [`setgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setgid.md) `rax = 106`: Takes gid in rdi.
- [`geteuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-geteuid.md) `rax = 107`: Takes no arguments.
- [`getegid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getegid.md) `rax = 108`: Takes no arguments.
- [`setpgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setpgid.md) `rax = 109`: Takes value in rdi, value in rsi.
- [`getppid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getppid.md) `rax = 110`: Takes no arguments.
- [`getpgrp`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getpgrp.md) `rax = 111`: Takes no arguments.
- [`setsid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setsid.md) `rax = 112`: Takes no arguments.
- [`setreuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setreuid.md) `rax = 113`: Takes uid in rdi, uid in rsi.
- [`setregid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setregid.md) `rax = 114`: Takes gid in rdi, gid in rsi.
- [`getgroups`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getgroups.md) `rax = 115`: Writes up to rdi supplementary group IDs to the array at rsi; with a zero size, returns how many IDs are needed.
- [`setgroups`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setgroups.md) `rax = 116`: Replaces the process’s supplementary group list with the rdi group IDs in the array at rsi.
- [`setresuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setresuid.md) `rax = 117`: Takes uid in rdi, uid in rsi, uid in rdx.
- [`getresuid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getresuid.md) `rax = 118`: Takes ruid (written by the kernel) in rdi, euid (written by the kernel) in rsi, suid (written by the kernel) in rdx.
- [`setresgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setresgid.md) `rax = 119`: Takes gid in rdi, gid in rsi, gid in rdx.
- [`getresgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getresgid.md) `rax = 120`: Takes rgid (written by the kernel) in rdi, egid (written by the kernel) in rsi, sgid (written by the kernel) in rdx.
- [`getpgid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getpgid.md) `rax = 121`: Takes process id in rdi.
- [`getsid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getsid.md) `rax = 124`: Takes value in rdi.
- [`rt_sigpending`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rt_sigpending.md) `rax = 127`: Takes set (written by the kernel) in rdi.
- [`rt_sigsuspend`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rt_sigsuspend.md) `rax = 130`: Takes i_sigset in rdi, byte count in rsi.
- [`sigaltstack`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sigaltstack.md) `rax = 131`: Takes stack (read by the kernel) in rdi, oldstack (written by the kernel) in rsi.
- [`utime`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-utime.md) `rax = 132`: Takes path (read by the kernel) in rdi, times (read by the kernel) in rsi.
- [`statfs`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-statfs.md) `rax = 137`: Takes path (read by the kernel) in rdi, buffer (written by the kernel) in rsi.
- [`fstatfs`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fstatfs.md) `rax = 138`: Takes fd in rdi, buffer (written by the kernel) in rsi.
- [`prctl`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-prctl.md) `rax = 157`: Takes value in rdi, value in rsi, value in rdx, value in r10, value in r8.
- [`arch_prctl`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-arch_prctl.md) `rax = 158`: Takes code in rdi, address (written by the kernel) in rsi.
- [`setrlimit`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-setrlimit.md) `rax = 160`: Takes resource in rdi, i_rlimit in rsi.
- [`sync`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sync.md) `rax = 162`: Takes no arguments.
- [`gettid`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-gettid.md) `rax = 186`: Takes no arguments.
- [`tkill`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-tkill.md) `rax = 200`: Takes process id in rdi, signal in rsi.
- [`time`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-time.md) `rax = 201`: Returns calendar time in whole seconds since the Unix epoch, and also stores it at the address in rdi unless rdi is 0.
- [`futex`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-futex.md) `rax = 202`: Takes value in rdi, value in rsi, value in rdx, value in r10, value in r8, value in r9.
- [`sched_getaffinity`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-sched_getaffinity.md) `rax = 204`: Takes pid in rdi, size in rsi, mask (written by the kernel) in rdx.
- [`getdents64`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getdents64.md) `rax = 217`: Takes fd in rdi, dirents (written by the kernel) in rsi, count in rdx.
- [`set_tid_address`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-set_tid_address.md) `rax = 218`: Takes tid (written by the kernel) in rdi.
- [`fadvise64`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fadvise64.md) `rax = 221`: Takes value in rdi, value in rsi, value in rdx, value in r10.
- [`clock_getres`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-clock_getres.md) `rax = 229`: Takes clockid in rdi, resolution (written by the kernel) in rsi.
- [`clock_nanosleep`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-clock_nanosleep.md) `rax = 230`: Takes clock in rdi, int in rsi, i_time in rdx, o_time in r10.
- [`tgkill`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-tgkill.md) `rax = 234`: Takes value in rdi, value in rsi, value in rdx.
- [`utimes`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-utimes.md) `rax = 235`: Takes path (read by the kernel) in rdi, times (read by the kernel) in rsi.
- [`openat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-openat.md) `rax = 257`: Takes directory descriptor in rdi, string in rsi, open flags in rdx, mode in r10.
- [`mkdirat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-mkdirat.md) `rax = 258`: Makes a directory at the path in rsi, relative to the directory descriptor in rdi, with the mode in rdx.
- [`fchownat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fchownat.md) `rax = 260`: Takes directory descriptor in rdi, path in rsi, uid in rdx, gid in r10, atflags in r8.
- [`futimesat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-futimesat.md) `rax = 261`: Takes dirfd in rdi, path (read by the kernel) in rsi, times (read by the kernel) in rdx.
- [`newfstatat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-newfstatat.md) `rax = 262`: Takes directory descriptor in rdi, path in rsi, o_stat in rdx, atflags in r10.
- [`unlinkat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-unlinkat.md) `rax = 263`: Takes directory descriptor in rdi, path in rsi, atflags in rdx.
- [`renameat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-renameat.md) `rax = 264`: Renames or moves the path at rsi, relative to the directory descriptor in rdi, to the path at r10, relative to the directory descriptor in rdx.
- [`linkat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-linkat.md) `rax = 265`: Takes directory descriptor in rdi, path in rsi, directory descriptor in rdx, path in r10, atflags in r8.
- [`symlinkat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-symlinkat.md) `rax = 266`: Takes path in rdi, directory descriptor in rsi, path in rdx.
- [`readlinkat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-readlinkat.md) `rax = 267`: Takes directory descriptor in rdi, string in rsi, buffer (written by the kernel) in rdx, byte count in r10.
- [`fchmodat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-fchmodat.md) `rax = 268`: Takes directory descriptor in rdi, path in rsi, mode in rdx.
- [`faccessat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-faccessat.md) `rax = 269`: Takes directory descriptor in rdi, path in rsi, accmode in rdx.
- [`pselect6`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pselect6.md) `rax = 270`: Takes nfds in rdi, readfds (written by the kernel) in rsi, writefds (written by the kernel) in rdx, exceptfds (written by the kernel) in r10, timeout (read by the kernel) in r8, sigmask (read by the kernel) in r9.
- [`ppoll`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-ppoll.md) `rax = 271`: Takes fds (written by the kernel) in rdi, nfds in rsi, timeout (read by the kernel) in rdx, sigmask (read by the kernel) in r10, sigsetsize in r8.
- [`set_robust_list`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-set_robust_list.md) `rax = 273`: Takes value in rdi, value in rsi.
- [`get_robust_list`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-get_robust_list.md) `rax = 274`: Takes value in rdi, value in rsi, value in rdx.
- [`utimensat`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-utimensat.md) `rax = 280`: Takes directory descriptor in rdi, path in rsi, o_time2 in rdx, atflags in r10.
- [`dup3`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-dup3.md) `rax = 292`: Takes file descriptor in rdi, int in rsi, open flags in rdx.
- [`pipe2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pipe2.md) `rax = 293`: Takes o_pfds in rdi, open flags in rsi.
- [`preadv`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-preadv.md) `rax = 295`: Takes file descriptor in rdi, iovec array (written) in rsi, byte count in rdx, offset in r10.
- [`pwritev`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pwritev.md) `rax = 296`: Writes the buffers listed by the iovec array at rsi, with rdx entries, to the descriptor in rdi at the offset in r10; returns the total bytes written without…
- [`prlimit64`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-prlimit64.md) `rax = 302`: Takes process id in rdi, resource in rsi, i_rlimit in rdx, o_rlimit in r10.
- [`renameat2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-renameat2.md) `rax = 316`: Renames or moves paths relative to the directory descriptors in rdi and rdx, using the flags in r8.
- [`getrandom`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-getrandom.md) `rax = 318`: Takes buffer (written by the kernel) in rdi, byte count in rsi, int in rdx.
- [`preadv2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-preadv2.md) `rax = 327`: Takes file descriptor in rdi, iovec array (written) in rsi, byte count in rdx, offset in r10, value in r8, int in r9.
- [`pwritev2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-pwritev2.md) `rax = 328`: Takes file descriptor in rdi, iovec array (read) in rsi, byte count in rdx, offset in r10, value in r8, int in r9.
- [`rseq`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-rseq.md) `rax = 334`: Takes value in rdi, value in rsi, value in rdx, value in r10.
- [`close_range`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-close_range.md) `rax = 436`: Takes value in rdi, value in rsi, value in rdx.
- [`faccessat2`](https://asm-editor.specy.app/documentation/x86/syscall/syscall-faccessat2.md) `rax = 439`: Takes directory descriptor in rdi, path in rsi, accmode in rdx, atflags in r10.
- [Differences from Linux](https://asm-editor.specy.app/documentation/x86/syscall/differences.md): The simulated environment has one process and one thread.
- [Program arguments](https://asm-editor.specy.app/documentation/x86/syscall/arguments.md): Enter Arguments on the Terminal's first line, the Command line, or in the project's Settings panel.
