namespace X86Disassembler.X86.Handlers.Flags; /// /// Handler for STC (Set Carry Flag) instruction (opcode F9) /// public class StcHandler : InstructionHandler { /// /// Initializes a new instance of the StcHandler class /// /// The instruction decoder that owns this handler public StcHandler(InstructionDecoder decoder) : base(decoder) { } /// /// Checks if this handler can decode the given opcode /// /// The opcode to check /// True if this handler can decode the opcode public override bool CanHandle(byte opcode) { // STC is F9 return opcode == 0xF9; } /// /// Decodes a STC instruction /// /// The opcode of the instruction /// The instruction object to populate /// True if the instruction was successfully decoded public override bool Decode(byte opcode, Instruction instruction) { // Set the instruction type instruction.Type = InstructionType.Stc; // STC has no operands instruction.StructuredOperands = []; return true; } }