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); }
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); }
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); }