/// <summary> /// Set the value of a given ARM Flag. /// </summary> /// <param name="Flag">The affected Flag</param> /// <param name="Value">The bit value that should be set (True = Set or False = Cleared)</param> public void SetFlag(ARMFlag Flag, bool Value) { if (Value) { CPSR |= (uint)Flag; } else { CPSR &= ~(uint)Flag; } }
/// <summary> /// Check if a Flag is cleared on the Status register. /// </summary> /// <param name="Flag">Flag that should be checked</param> /// <returns>True if the flag is cleared, false otherwise</returns> public bool IsFlagClear(ARMFlag Flag) { return((CPSR & (uint)Flag) == 0); }
/// <summary> /// Checks if a Flag is set on the Status register. /// </summary> /// <param name="Flag">Flag that should be checked</param> /// <returns>True if the flag is set, false otherwise</returns> public bool IsFlagSet(ARMFlag Flag) { return((CPSR & (uint)Flag) != 0); }