diff --git a/InstructionSets/x86/Status.hpp b/InstructionSets/x86/Status.hpp new file mode 100644 index 000000000..8ccb31c6b --- /dev/null +++ b/InstructionSets/x86/Status.hpp @@ -0,0 +1,61 @@ +// +// Status.hpp +// Clock Signal +// +// Created by Thomas Harte on 05/10/2023. +// Copyright © 2023 Thomas Harte. All rights reserved. +// + +#ifndef InstructionSets_x86_Status_hpp +#define InstructionSets_x86_Status_hpp + + +namespace InstructionSet::x86 { + +namespace ConditionCode { + +// +// Standard flags. +// + +static constexpr uint32_t Carry = 1 << 0; +static constexpr uint32_t Parity = 1 << 2; +static constexpr uint32_t AuxiliaryCarry = 1 << 4; +static constexpr uint32_t Zero = 1 << 6; +static constexpr uint32_t Sign = 1 << 7; +static constexpr uint32_t Trap = 1 << 8; +static constexpr uint32_t Interrupt = 1 << 9; +static constexpr uint32_t Direction = 1 << 10; +static constexpr uint32_t Overflow = 1 << 11; + +// +// 80286+ additions. +// + +static constexpr uint32_t IOPrivilege = (1 << 12) | (1 << 13); +static constexpr uint32_t NestedTask = 1 << 14; + +// +// 16-bit protected mode flags. +// + +static constexpr uint32_t ProtectionEnable = 1 << 16; +static constexpr uint32_t MonitorProcessorExtension = 1 << 17; +static constexpr uint32_t ProcessorExtensionExtension = 1 << 18; +static constexpr uint32_t TaskSwitch = 1 << 19; + +// +// 32-bit protected mode flags. +// + +static constexpr uint32_t Resume = 1 << 16; +static constexpr uint32_t VirtualMode = 1 << 17; + +} + +struct Status { +}; + +} + +#endif /* InstructionSets_x86_Status_hpp */ diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj index 81c6ba4b8..a79d0850e 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj +++ b/OSBindings/Mac/Clock Signal.xcodeproj/project.pbxproj @@ -1126,6 +1126,7 @@ /* Begin PBXFileReference section */ 423BDC492AB24699008E37B6 /* 8088Tests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = 8088Tests.mm; sourceTree = ""; }; + 42437B342ACF02A9006DFED1 /* Status.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Status.hpp; sourceTree = ""; }; 4281572E2AA0334300E16AA1 /* Carry.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = Carry.hpp; sourceTree = ""; }; 428168372A16C25C008ECD27 /* LineLayout.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = LineLayout.hpp; sourceTree = ""; }; 428168392A37AFB4008ECD27 /* DispatcherTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DispatcherTests.mm; sourceTree = ""; }; @@ -4993,6 +4994,7 @@ 4BEDA3B825B25563000C2DBD /* Decoder.hpp */, 4BEDA3DB25B2588F000C2DBD /* Instruction.hpp */, 4BE3C69527CBC540000EAD28 /* Model.hpp */, + 42437B342ACF02A9006DFED1 /* Status.hpp */, ); path = x86; sourceTree = "";