Пример #1
0
 /// <summary>
 /// Checks the highest order bit of the specified 16-bit value and sets the Negative status flag if it is not equal to zero, otherwise the flag is cleared.
 /// </summary>
 /// <param name="state">The CPUState instance containing register values and other state properties of the CPU.</param>
 /// <param name="value">The value to be checked.</param>
 protected void CheckNegativeFlag(CPUState state, int value)
 {
     state.ChangeStatusFlag(StatusFlag.Negative, (value & 0x80) != 0);
 }
Пример #2
0
 /// <summary>
 /// Checks the specified value and sets the Zero status flag if it is equal to zero, otherwise the flag is cleared.
 /// </summary>
 /// <param name="state">The CPUState instance containing register values and other state properties of the CPU.</param>
 /// <param name="value">The value to be checked.</param>
 protected void CheckZeroFlag(CPUState state, int value)
 {
     state.ChangeStatusFlag(StatusFlag.Zero, value == 0);
 }