disassembleOne

Disassemble single instruction at current position.

Updates the position for the next call.

Return

Result containing instruction or null if end reached

Example:

val position = DisassemblyPosition(0, 0x1000)
while (position.hasRemaining(code.size)) {
engine.disassembleOne(code, position).onSuccess { insn ->
insn?.let { println(it) }
}
}

Parameters

code

Binary machine code bytes

position

Current position (will be updated on success)