2019-02-04 23:52:21 +00:00
|
|
|
|
// <copyright file="StatusBits.cs" company="Adrian Conlon">
|
|
|
|
|
// Copyright (c) Adrian Conlon. All rights reserved.
|
|
|
|
|
// </copyright>
|
|
|
|
|
|
|
|
|
|
namespace EightBit
|
2019-02-02 15:12:51 +00:00
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
[Flags]
|
|
|
|
|
public enum StatusBits : byte
|
|
|
|
|
{
|
2019-02-14 23:51:32 +00:00
|
|
|
|
None = 0,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// Carry
|
|
|
|
|
CF = Bits.Bit0,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// Zero
|
|
|
|
|
ZF = Bits.Bit1,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// I (IRQ disable)
|
|
|
|
|
IF = Bits.Bit2,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
|
|
|
|
// D (use BCD for arithmetic)
|
|
|
|
|
DF = Bits.Bit3,
|
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// Brk
|
|
|
|
|
BF = Bits.Bit4,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// reserved
|
|
|
|
|
RF = Bits.Bit5,
|
2019-02-02 15:12:51 +00:00
|
|
|
|
|
2019-02-14 23:51:32 +00:00
|
|
|
|
// Overflow
|
|
|
|
|
VF = Bits.Bit6,
|
|
|
|
|
|
|
|
|
|
// Negative
|
|
|
|
|
NF = Bits.Bit7,
|
|
|
|
|
}
|
2019-02-02 15:12:51 +00:00
|
|
|
|
}
|