SharpDisasm.Disassembler.NextInstruction C# (CSharp) Méthode

NextInstruction() public méthode

Decodes a single instruction and increments buffer position.
public NextInstruction ( ) : Instruction
Résultat Instruction
        public Instruction NextInstruction()
        {
            int length = 0;
            if ((length = Udis86.udis86.ud_disassemble(ref _u)) > 0)
            {
                var instruction = new Instruction(ref _u, CopyBinaryToInstruction);
                if (!instruction.Error)
                {
                    BytesDecoded += length;
                }
                return instruction;
            }
            return null;
        }

Usage Example

 public IEnumerable<Instruction> Disassemble(Disassembler disassembler)
 {
     disassembler.Reset();
     Instruction instruction;
     while ((instruction = disassembler.NextInstruction()) != null)
         yield return instruction;
 }
All Usage Examples Of SharpDisasm.Disassembler::NextInstruction