80386 Programmer's Reference Manual -- Opcode STI

STI -- Set Interrupt Flag

OpcodeInstructionClocks DescriptionExample
F13sti 3 Set interrupt flagsti


IF := 1


STI sets the interrupt flag to 1. The 80386 then responds to external interrupts after executing the next instruction if the next instruction allows the interrupt flag to remain enabled. If external interrupts are disabled and you code STI, RET (such as at the end of a subroutine), the RET is allowed to execute before external interrupts are recognized. Also, if external interrupts are disabled and you code STI, CLI, then external interrupts are not recognized because the CLI instruction clears the interrupt flag during its execution.

Flags Affected

IF := 1

Protected Mode Exceptions

#GP(0) if the current privilege level is greater (has less privilege) than the I/O privilege level

Real Address Mode Exceptions


Virtual 8086 Mode Exceptions


[Home Page dell'ITIS "Fermi"] [80386 Programmer's Reference Manual Index] [Previous] [Next]