现在的位置: 首页 > 综合 > 正文

int 0×80 Definition

2013年11月04日 ⁄ 综合 ⁄ 共 1863字 ⁄ 字号 评论关闭
 

int 0x80 Definition

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).

系统调用是在类Unix OS上,一个活动进程通过软件中断提出的, 希望得到内核服务的请求,比如I/O服务(与键盘,鼠标或显示设备的通讯)或者进程创建。

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.

中断是通知操作系统某件事件发生的信号,它会改变CPU当前执行的指令顺序。不同的中断源包括键盘上的按键、鼠标的移动、定时器、磁盘驱动、网络信号以及断电等等。

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 numberarguments (i.e., input data) for it. 

抱歉!评论已关闭.