From a00e548533eed5b1aead479e70a117eb05458a5f Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 8 Jan 2012 22:37:21 +0000 Subject: Added rest of ED opcodes and GPL fixed headers. --- src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs | 83 +++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs (limited to 'src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs') diff --git a/src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs b/src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs new file mode 100644 index 0000000..edcd5f5 --- /dev/null +++ b/src/Noddybox.Emulation.EightBit.Z80/Z80Flags.cs @@ -0,0 +1,83 @@ +// This file is part of the Noddybox.Emulation C# suite. +// +// Noddybox.Emulation is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Noddybox.Emulation is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Noddybox.Emulation. If not, see . +// +// Copyright (c) 2012 Ian Cowburn +// +using System; + +namespace Noddybox.Emulation.EightBit.Z80 +{ + /// + /// Defines the bits in the Z80 flag register. + /// + [Flags] + public enum Z80Flags + { + /// + /// No flags set. + /// + None = 0x00, + + /// + /// The carry flag. + /// + Carry = 0x01, + + /// + /// The negative flag. + /// + Neg = 0x02, + + /// + /// The parity/overflow flag. + /// + PV = 0x04, + + /// + /// A hidden flag. Undocumented by Zilog, but affected by most operations. + /// + Hidden3 = 0x08, + + /// + /// The half-carry flag. + /// + HalfCarry = 0x10, + + /// + /// A hidden flag. Undocumented by Zilog, but affected by most operations. + /// + Hidden5 = 0x20, + + /// + /// The zero flag. + /// + Zero = 0x40, + + /// + /// The sign flag. + /// + Sign = 0x80, + + /// + /// A bitmask for all the hidden registers. + /// + Hidden = Hidden3 | Hidden5, + + /// + /// All bits set. + /// + All = 0xff + }; +} -- cgit v1.3