public static uint AutoEncode(this Encoder Encoder, InstructionList List, ulong IP) { uint Len = 0; foreach (var Instruction in List) { Len += Encoder.AutoEncode(Instruction, IP + Len); } return(Len); }
public static uint AutoEncode(this Encoder Encoder, InstructionList List, ulong IP) { uint Len = 0; InstructionList NewList = new InstructionList(); foreach (var Instruction in List) { var NewInstruction = Encoder.AutoEncode(Instruction, IP + Len); NewList.AddRange(NewInstruction); Len += (uint)NewInstruction.GetEncodedSize(64, IP + Len); } Len = 0; foreach (var Instruction in NewList) { Len += Encoder.Encode(Instruction, IP + Len); } return(Len); }