Main Page | See live article | Alphabetical index

CLear Interrupts

In x86 assembly, CLI is a mnemonic for CLear Interrupts. It sets the IF flag to zero, so any external interrupts are not being serviced. An opcode with opposite functionality is STI, which sets IF = 1 and tells the CPU to service external interrupts.

Any software interrupts will be serviced whether IF = 1 or 0. A software interrupt is one called by the instruction INT xx.

The combination CLI HLT (first disables interrupts and the second halts execution as long as an interrupt occurs) can be hazardous, as it hangs the computer.

See also, STI, x86