x86 Assembly Language Reference Manual

Load Flags into AH Register (lahf)

lahf

Operation

SF:ZF:xx:AF:xx:PF:xx:CF -> AH

Description

Transfers the low byte of the flags word to the AH register. The bits (lsb to msb) are: sign, zero, indeterminate, auxiliary carry, indeterminate, parity, indeterminate, and carry.

Example

Transfer the flags word into the AH register:

lahf