![]() ExampleĬlear the direction flag: cld Set Direction Flag (std) std Operation Causes all subsequent string operations to increment the index registers, (E)SI and/or (E)DI, used during the operation. Set the interrupt flag: sti Clear Direction Flag (cld) cld OperationĬlears the direction flag affects no other flags or registers. ExampleĬlear the interrupt flag: cli Set Interrupt Flag (sti) sti Operation External interrupts disabled at the end of the cli instruction or from that point on until the interrupt flag is set. Set the carry flag: stc Clear Interrupt Flag (cli) cli OperationĬlears the interrupt flag if the current privilege level is at least as privileged as IOPL affects no other flags. ExampleĬlear the carry flag: clc Set Carry Flag (stc) stc Operation Sets the carry flag to zero affects no other flags. Reverse the setting of the carry flag: cmc Clear Carry Flag (clc) Reverses the setting of the carry flag affects no other flags. Pushes the eflags register onto the top of the stack: pushfl Complement Carry Flag (cmc) cmc Operation Pushes the flags register onto the top of the stack: pushfw For a long, SP - 4 and copies EFLAGS to the new top of stack pointed to by SS:eSP. Pops the long from the top of the stack and stores it in the eflags register: popfl Push Flag Register Onto Stack ( pushf)įor a word, SP - 2 and copies FLAGS to the new top of stack pointed to by SP. Pops the word from the top of the stack and stores it in the flags register: popfw Stores a word in FLAGS stores a long in EFLAGS. Pops the word or long from the top of the stack and stores the value in the flags register. Load values from the AH register into the flags word: sahf Pop Stack into Flag ( popf) popf Operation Loads flags (sign, zero, indeterminate, auxiliary carry, indeterminate, parity, indeterminate, and carry) with values from the AH register. Transfer the flags word into the AH register: lahf Store AH into Flags (sahf) sahf OperationĪH -> SF:ZF:xx:AF:xx:PF:xx:CF Description The bits (lsb to msb) are: sign, zero, indeterminate, auxiliary carry, indeterminate, parity, indeterminate, and carry. Transfers the low byte of the flags word to the AH register. SF:ZF:xx:AF:xx:PF:xx:CF -> AH Description Flag Instructions Load Flags into AH Register (lahf) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |