image/svg+xmlLAHF—Load Status Flags into AH RegisterInstruction Operand EncodingDescriptionThis instruction executes as described above in compatibility mode and legacy mode. It is valid in 64-bit mode only if CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1. OperationIF 64-Bit ModeTHENIF CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1;THEN AH := RFLAGS(SF:ZF:0:AF:0:PF:1:CF);ELSE #UD; FI;ELSEAH := EFLAGS(SF:ZF:0:AF:0:PF:1:CF);FI;Flags AffectedNone. The state of the flags in the EFLAGS register is not affected.Protected Mode Exceptions#UD If the LOCK prefix is used.Real-Address Mode ExceptionsSame exceptions as in protected mode.Virtual-8086 Mode ExceptionsSame exceptions as in protected mode.Compatibility Mode ExceptionsSame exceptions as in protected mode.64-Bit Mode Exceptions#UDIf CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 0.If the LOCK prefix is used.OpcodeInstructionOp/ En64-Bit ModeCompat/Leg ModeDescription9F LAHFZOInvalid*ValidLoad: AH := EFLAGS(SF:ZF:0:AF:0:PF:1:CF).NOTES:*Valid in specific steppings. See Description section.Op/EnOperand 1Operand 2Operand 3Operand 4ZONANANANA

This UNOFFICIAL reference was generated from the official Intel® 64 and IA-32 Architectures Software Developer’s Manual by a dumb script. There is no guarantee that some parts aren't mangled or broken and is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.