public override i8051Instruction Decode(uint op, i8051Disassembler dasm) { foreach (var m in mutators) { if (!m(op, dasm)) { return(dasm.CreateInvalidInstruction()); } } return(new i8051Instruction { Mnemonic = opcode, Address = dasm.addr, Length = (int)(dasm.rdr.Address - dasm.addr), Operands = dasm.ops.ToArray() }); }
public override i8051Instruction Decode(byte op, i8051Disassembler dasm) { foreach (var m in mutators) { if (!m(op, dasm)) { return(dasm.CreateInvalidInstruction()); } } return(new i8051Instruction { Opcode = opcode, Address = dasm.addr, Length = (int)(dasm.rdr.Address - dasm.addr), Operand1 = dasm.ops.Count >= 1 ? dasm.ops[0] : null, Operand2 = dasm.ops.Count >= 2 ? dasm.ops[1] : null, Operand3 = dasm.ops.Count >= 3 ? dasm.ops[2] : null, }); }