int 0x80 is the assembly language instruction that is used to invoke system calls in Linux on x86 (i.e., Intel-compatible) processors.
An assembly language is a human-readable notation for the machine language that a specific type of processor (also called a central processing unit or CPU) uses. Machine language, also referred to as machine code, is a pattern of bits (i.e., zeros and ones) that is directly readable by a processor.
A system call is a request in a Unix-like operating system made via a software interrupt by an active process for a service performed by the kernel (i.e., the core of the operating system), such as input/output (e.g., communication with the keyboard, mouse or display device) or process creation (i.e., the creation of a new process). A process is an executing (i.e., running) instance of a program; an active process is a process that is currently advancing in the CPU (as opposed to processes that are awaiting their turns for use of the CPU).
An interrupt is a signal to the operating system that an event has occurred, and it results in changes in the sequence of instructions executed by the CPU. There are numerous sources of interrupts, including pressing a key on keyboard, moving the mouse, timers, disk drives, signals originating elsewhere on the network and the loss of electrical power. A software interrupt is an interrupt that originates in software, usually by a process in user mode.
Each process starts out in user mode. When a process makes a system call, it causes the CPU to switch temporarily into kernel mode, which has root (i.e., administrative) privileges, including access to any memory space or other resources on the system. When the kernel has satisfied the process's request, it restores the process to user mode.
When a system call is made, the calling of the int 0x80 instruction is preceded by the storing in the process register (i.e., a very small amount of high-speed memory built into the processor) of the system call number (i.e., the integer assigned to each system call) for that system call and any arguments (i.e., input data) for it.
Created August 12, 2005.