An acronym for Command Line Interface. A useful method of interacting with a computer. Some claim that it is more versatile than a GUI - its graphical equivalent.

CLI is also a TLA for Calling Line Information, information on a phone call which tells the recipient your number. It is used by ISPs and is required to be sent to use the Caller ID feature of some phones and to use the 1471 number.
CLI can be temporarily witheld by dialling 141 before calling or it can be permamently witheld by phoning a special number maintained by BT.

Please note: To the best of my knowledge this only applies in the UK.

cf. 1471 and 141.

An opcode for the 6502 processor. This is a so-called flag operation.
A CLI operations clears the interrupt flag. When this happens, the processor can resume its normal operation (out of interrupt mode).

Back to the 6502 opcodes metanode

1. A command line interface.

2. A 6502 instruction that clears the I (interrupt disable) flag, allowing IRQs to interrupt the code.

  • Function: 0 => I
  • Updates flags: . . . . . I . .
  • Opcode number: impl $58

Caution: Do not confuse this with the cli instruction of x86, which does the exact opposite.

As opposed to: SEI
See also: 6502 instructions | 6502 addressing modes

The "CLear Interrupt" instruction on x86 processors.

This instruction unsets the Interrupt flag in the FLAGS (or EFLAGS in 32 bit mode) register, stopping interrupts from external sources (except the NMI). To put the interrupt flag back to normal, use the STI (SeT Interrupt) instruction.

This is mainly used for time-critical code that must be executed in real-time, and while doing things which could get messed up if an interrupt occured in the middle. For example, if for some strange reason you wanted to set the stack to DEAD:BEEF, you might try this:

mov ax, 0DEADh
mov ss, ax ; can't access segment registers directly
mov sp, 0BEEFh

It would most likely work, but what if an interrupt occured between setting SS and setting SP? Since interrupts push things onto the stack, something in the DEAD segment could get overwritten. So it would be best to use CLI:

mov ax, 0DEADh
mov ss, ax
mov sp, 0BEEFh

The opcode for CLI is 0xFA.

Log in or register to write something here or to contact authors.