if the value in EAX is 0圆0E0FEFC, the zero flag (ZF) is set to 1.if the value in EAX is 0x81010102, the zero flag (ZF) does not get set, so flow of control does not branch here.the zero flag (ZF) is set to 1 if the results of an arithmetic or logical operation (like TEST) are 0.TEST is like AND, but the results of the operation are not saved.As a result, flow of control branches at this point (EIP jumps). If the value in EAX is 0圆0E0FEFC, the zero flag (ZF) is set to 1 (see above). If the value in EAX is 0x81010102, the zero flag (ZF) does not get set (see above), so flow of control does not branch here. If the condition is not satisfied, the jump is not performed and execution continues with the instruction following the Jcc instruction. A condition code (cc) is associated with each instruction to indicate the condition being tested for. checks the state of one or more of the status flags in the EFLAGS register (CF, OF, PF, SF, and ZF) and, if the flags are in the specified state (condition), performs a jump to the target instruction specified by the destination operand. JEĪccording to the x86 Instruction Set Reference entry for JE found at , Here the result is 0, so the zero flag (ZF) is set to 1. The result, 81010000, is not 0, so the zero flag is not set. The value in EAX and 81010100 are ANDed together. The AND instruction without storing the result The result is then discarded.ĪND imm32 with EAX set SF, ZF, PF according to result. computes the bit-wise logical AND of first operand (source 1 operand) and the second operand (source 2 operand) and sets the SF, ZF, and PF status flags according to the result. According to the x86 Instruction Set Reference entry for TEST found at ,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |