예제 #1
0
        static List<CStatement> Std_C(uint pc, uint instruction)
        {
            Instruction i = new Instruction(instruction);

            CStatement stat = new CStatement(CStatement.Kinds.Assignment);

            if (i.RS() == 0)
                stat.Op2 = new CStatement.COperand(0);
            else
                stat.Op2 = new CStatement.COperand(RegName(i.RS()));

            int ds = (int)(short)(ushort)(i.DS() << 2);
            if (i.RA() != 0)
                stat.Op1 = new CStatement.COperand(RegName(i.RA()), ds);
            else
            {
                stat.Op1 = new CStatement.COperand();
                stat.Op1.Kind = CStatement.OperandKinds.AddressPointer;
                stat.Op1.Offset = ds;
            }

            List<CStatement> stats = new List<CStatement>();
            stats.Add(stat);
            return stats;
        }