示例#1
0
    public bool GetInstrLookUp(string instruction, out InstrDecl instrDecl)
    {
        instruction = instruction.ToUpper();

        instrDecl = new InstrDecl();

        if (!instrLookUp.ContainsKey(instruction))
        {
            return(false);
        }

        instrDecl = instrLookUp[instruction];

        return(true);
    }
示例#2
0
    public bool SetOpType(string instruction, int argNum, int flags)
    {
        if (!instrLookUp.ContainsKey(instruction))
        {
            return(false);
        }

        InstrDecl instrDecl = instrLookUp[instruction];

        if (argNum >= 0 && argNum < instrDecl.ParamsCount)
        {
            instrDecl.ParamsFlags[argNum] = flags;
        }
        else
        {
            return(false);
        }

        instrLookUp[instruction] = instrDecl;

        return(true);
    }
示例#3
0
    public bool AddInstrLookUp(string instruction, int opcode, int argsCount)
    {
        instruction = instruction.ToUpper();

        if (instrLookUp.ContainsKey(instruction))
        {
            return(false);
        }

        InstrDecl instrDecl = new InstrDecl();

        instrDecl.OpCode      = opcode;
        instrDecl.ParamsCount = argsCount;

        if (argsCount > 0)
        {
            instrDecl.ParamsFlags = new int[argsCount];
        }

        instrLookUp[instruction] = instrDecl;

        return(true);
    }