syscall

Pentium Pro and later

Fast System Call

syscall

Asks the operating system to do something. rax holds the call number, the arguments go in rdi, rsi, rdx, r10, r8 and r9 in that order, and the result comes back in rax, with a small negative number meaning an error. rcx and r11 are destroyed by the call itself, so anything kept in them has to be saved first.

Programs here run as Linux programs, so this is the only way a program reaches the console or the file system. The syscall page lists the calls this emulator implements.

Loading...

Forms

Every form of syscall the assembler accepts, from NASM's own instruction table. The second column is the processor that introduced the form; a badge marks a form that needs an extension, that is lockable, or that long mode dropped.

FormSinceNotes
syscall Pentium Pro