LAHF
Instruction
LAHF
instruction (load status flags into AH
) copies the low byte of the EFLAGS
register into AH
.
LAHF — Load Register AH from Flags |
|||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
EFLAGS
register is a 32-bit register. Nine of its bits are shown below. Use this instruction, you can save a copy of the flags in a memory variable or test several flags at once.
EFLAGS Register |
||||||||
---|---|---|---|---|---|---|---|---|
Control Flags | Status Flags | |||||||
T |
D |
I |
O |
S |
Z |
A |
P |
C |
Trap | Direction | Interrupt -enable |
Overflow | Sign | Zero | Auxiliary Carry |
Parity | Carry |
|
†The TEST instruction performs an implied AND operation between each pair of matching bits in two operands and sets the flags accordingly.
|