STI (x86 instruction)

From Free net encyclopedia

In the x86 assembly language, the STI instruction is a mnemonic for SeT Interrupts. It sets the interrupt flag (IF) in the EFLAGS register to one, which enables the reception of maskable interrupts by the processor. The CLI instruction is the inverse of the STI instruction.

Overview

The STI instruction exhibits the same behavior as a memory barrier. Therefore, it may also be used as a general cache and instruction stream synchronization mechanisim.

Software interrupts, generated by the INT instruction, will be serviced irrespective of the value of IF.

See also