예제 #1
0
            public override Tms7000Instruction Decode(uint b, Tms7000Disassembler dasm)
            {
                foreach (var m in mutators)
                {
                    if (!m(b, dasm))
                    {
                        return(dasm.CreateInvalidInstruction());
                    }
                }
                var instr = new Tms7000Instruction
                {
                    Mnemonic         = opcode,
                    InstructionClass = iclass,
                    Operands         = dasm.ops.ToArray()
                };

                return(instr);
            }
예제 #2
0
            public Tms7000Instruction Decode(byte b, Tms7000Disassembler dasm)
            {
                foreach (var m in mutators)
                {
                    if (!m(b, dasm))
                    {
                        return(dasm.CreateInvalidInstruction());
                    }
                }
                var instr = new Tms7000Instruction
                {
                    Opcode           = opcode,
                    InstructionClass = iclass,
                    op1 = dasm.ops.Count > 0 ? dasm.ops[0] : null,
                    op2 = dasm.ops.Count > 1 ? dasm.ops[1] : null,
                    op3 = dasm.ops.Count > 2 ? dasm.ops[2] : null,
                };

                return(instr);
            }