Flag Control
Name Description Code Operation operands operand size
stc Set carry flag
stc CF = 1    
clc Clear the carry flag clc CF = 0    
cmc Complement the carry flag cmc CF = ! CF    
std Set direction flag std DF = 1    
cld Clear the direction flag cld DF = 0    
sti Set interrupt flag sti IF = 1    
cli Clear the interrupt flag cli IF = 0    
lahf Load flags into AH register lahf ah = (S,Z, ,A, ,P, ,C)    
sahf Store AH register into flags sahf (S,Z, ,A, ,P, ,C) = ah    
pushf Push EFLAGS onto stack pushf
pushfw
pushfd
O, D, I, T, S, Z, A, P, C 286+: also NT, IOPL    
popf Pop EFLAGS from stack

popf
popfw
popfd

O, D, I, T, S, Z, A, P, C 286+: also NT, IOPL