# `cli`

[x86-64 Documentation](https://asm-editor.specy.app/documentation/x86.md) › [Instructions](https://asm-editor.specy.app/documentation/x86/instruction.md)

Web page: https://asm-editor.specy.app/documentation/x86/instruction/cli

**Clear interrupt flag** · Privileged

Category: System

Clears the interrupt flag, disabling maskable interrupts.

8086 and later

[Intel's reference: CLI](https://intel.github.io/SDM/instruction/CLI.html)

## Flags

| Flag | Effect |
| --- | --- |
| CF | not changed |
| PF | not changed |
| AF | not changed |
| ZF | not changed |
| SF | not changed |
| IF | always 0 |
| DF | not changed |
| OF | not changed |

## Forms

- `cli`

## Description

Only privileged code may do this, such as an operating-system kernel: in a Linux program `cli` raises a general-protection fault, which the program receives as a segmentation fault. [`sti`](https://asm-editor.specy.app/documentation/x86/instruction/sti.md) sets the flag again.

## Example

```x86
global _start

section .text
_start:
        mov rax, 12
        mov rbx, 5
        mov rcx, 3
        mov rsi, 9

        cli

        mov rax, 60         ; syscall 60: exit
        xor rdi, rdi
        syscall
```
