public List <ushort> GetOperands(byte opcode) { var args = new List <ushort>(); if (Bits.BitsSet(opcode, (byte)OperationForm.Variable)) { // Section 4.4.3 var types = _memoryManager.Get(_stack.GetPCAndInc()); byte types2 = 0; if (opcode == 0xec || opcode == 0xfa) { types2 = _memoryManager.Get(_stack.GetPCAndInc()); } GetVariableOperands(types, args); if (opcode == 0xec || opcode == 0xfa) { GetVariableOperands(types2, args); } } else if (Bits.BitsSet(opcode, (byte)OperationForm.Short)) { // Section 4.4.1 args.Add(GetOperand(ShortFormOperandType(opcode))); } else // Long Form { // Section 4.4.2 args.Add(GetOperand(LongFormOperandType1(opcode))); args.Add(GetOperand(LongFormOperandType2(opcode))); } return(args); }
private static OperandType LongFormOperandType2(byte opcode) // Section 4.4.2 => Bits.BitsSet(opcode, (byte)OperandTypeMasks.LongFormType2) ? OperandType.Variable : OperandType.SmallConstant;