Lua:getInstructionSize

From Cheat Engine
Revision as of 00:21, 5 December 2025 by Leunsel (talk | contribs) (Added CodeBox Template.)
Jump to navigation Jump to search

<> Lua API Reference

function getInstructionSize(address) : Integer

Returns the size (in bytes) of the instruction at the given address. Basically, it disassembles the instruction and returns how many bytes it occupies.

Function Parameters

Parameter Type Description
address Integer The memory address of the instruction to analyze.

Example

local size = getInstructionSize(0x401000)
print("Instruction size:", size)

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Assembler and Disassembler Related Lua Functions

Auto assembler, disassembly helpers, instruction size lookup, and assembler callbacks