now it's posible to track store in CF, OF, ZF and SF bits of flag register.
Algorithm works in next way. Two steps should be performed to understand what flag bits were changed. First step: necessary to compare previous flag register value with currently computed. If this value not equal then some bits in flag register were changed. Second step: necessary to check all bits, that are interested for us. flags_value & bit_mask - for current bit value, defined with bit_mask. So if previous bit value is not equal to present, then bit was changed. The only thing is left to do is to find out this current bit value: current_flags & bit_mask.
now it's posible to track store in CF, OF, ZF and SF bits of flag register. Algorithm works in next way. Two steps should be performed to understand what flag bits were changed. First step: necessary to compare previous flag register value with currently computed. If this value not equal then some bits in flag register were changed. Second step: necessary to check all bits, that are interested for us.
flags_value & bit_mask
- for current bit value, defined withbit_mask
. So if previous bit value is not equal to present, then bit was changed. The only thing is left to do is to find out this current bit value:current_flags & bit_mask
.