Home  Site Map  Instruction Index 

SAHF  -  Save Flags Instruction


The SAHF instruction is used to save the flags in AH to the EFlags Register.

Use the SET instructions to change the current flags.

Load the Flags into AH using LAHF.

When used this instruction updates the following flags:

  • Bit 0 - CF Carry Flag
  • Bit 2 - PF Parity Flag
  • Bit 4 - AF Flag
  • Bit 6 - ZF Zero Flag
  • Bit 7 - SF Sign Flag

Bits 1,3 and 5 are not changed