Esempio n. 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="sOpName">Opcode Name</param>
 /// <param name="iNumberOfOperands">Number of operands for the current command</param>
 /// <param name="sOpType">Information about the operands. See documentation for more info</param>
 /// <param name="iOpCode">The opcode value</param>
 /// <param name="impFunc">Implemantation function for the commands</param>
 /// <param name="sHelpEntry">Help URL for the opcode</param>
 public OpCodeData(string sOpName, int iNumberOfOperands,
                   string sOpType, int iOpCode, VAX11Opcodes.OpcodeImplementation impFunc, int iCycles, string sHelpEntry)
 {
     OpName                 = sOpName;
     OpCode                 = iOpCode;
     NumberOfOperands       = iNumberOfOperands;
     OpType                 = sOpType;
     ImplementationFunction = impFunc;
     Cycles                 = iCycles;
     HelpEntry              = sHelpEntry;
 }
Esempio n. 2
0
 /// <summary>
 /// Gets opcode value and returns all the information about it
 /// </summary>
 /// <param name="OpcodeValue">Opcode Value</param>
 /// <param name="iPC">Current PC, in case we throw runtime error</param>
 public OpcodeEntry(int OpcodeValue, int iPC)
 {
     if (OpcodeValuesHashTable.ContainsKey(OpcodeValue) == false)
     {
         throw new RuntimeError(SimulatorMessage.UNRECOGNIZED_OPCODE_NAME, iPC);
     }
     _OpCode           = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).OpCode;
     _NumberOfOperands = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).NumberOfOperands;
     _OpType           = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).OpType;
     _impFunc          = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).ImplementationFunction;
     _HelpEntry        = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).HelpEntry;
     _Cycles           = ((OpCodeData)OpcodeValuesHashTable[OpcodeValue]).Cycles;
 }
Esempio n. 3
0
 /// <summary>
 /// Gets opcode name and returns all the information about it
 /// </summary>
 /// <param name="OpcodeName">Opcode Name</param>
 public OpcodeEntry(string OpcodeName)
 {
     OpcodeName = OpcodeName.ToUpper();
     if (OpcodeHashTable.ContainsKey(OpcodeName) == false)
     {
         throw new CompileError(CompilerMessage.UNRECOGNIZED_OPCODE_NAME);
     }
     _OpCode           = ((OpCodeData)OpcodeHashTable[OpcodeName]).OpCode;
     _NumberOfOperands = ((OpCodeData)OpcodeHashTable[OpcodeName]).NumberOfOperands;
     _OpType           = ((OpCodeData)OpcodeHashTable[OpcodeName]).OpType;
     _impFunc          = ((OpCodeData)OpcodeHashTable[OpcodeName]).ImplementationFunction;
     _HelpEntry        = ((OpCodeData)OpcodeHashTable[OpcodeName]).HelpEntry;
     _Cycles           = ((OpCodeData)OpcodeHashTable[OpcodeName]).Cycles;
 }