Difference between revisions of "Lua:getInstructionSize"
Jump to navigation
Jump to search
m (Added CodeBox Template.) |
m (Syntax Highlighting.) |
||
| Line 17: | Line 17: | ||
===Example=== | ===Example=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
local size = getInstructionSize(0x401000) | local size = getInstructionSize(0x401000) | ||
print("Instruction size:", size) | print("Instruction size:", size) | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
{{Assembly}} | {{Assembly}} | ||
Latest revision as of 19:27, 25 June 2026
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[edit]
| Parameter | Type | Description |
|---|---|---|
| address | Integer | The memory address of the instruction to analyze. |
Example[edit]
1 local size = getInstructionSize(0x401000)
2 print("Instruction size:", size)