Root > Reference > All Functions > DecodeInstruction

Function DecodeInstruction

Previous pageReturn to chapter overviewNext page   

Decodes a single CPU instruction.

 

Unit

EDisAsm

 

Syntax

 

Code (Delphi)

function DecodeInstruction(

Address: PAddress;

const AExternalProcess: Boolean = False

): TInstruction;

 

Parameters

Address [in]

A pointer to CPU instruction to decode.

 

Return value

Decoded CPU instruction at Address. Exact structure of TInstruction depends on current CPU. Please, refer to source code of the unit for your CPU (such as EDisAsmX8632.pas, EDisAsmX8664.pas, etc.).

 

Remarks

This is low-level disassembler routine which decodes a single CPU instruction and stores detailed information into TInstruction record. The decoded information includes prefixes, opcode, MOD/SIB bytes, displacement and immediate values - plus evaluated information: such as pointer to next instruction, flags, sizes of various data, etc. Exact structure of TInstruction depends on current CPU. Please, refer to source code of the unit for your CPU (such as EDisAsmX8632.pas, EDisAsmX8664.pas, etc.).

 

The decoded information can be used "as is" or it can be converted into textual representation by InstructionToString function.

 

Note

You can use DisasmInstruction function if you need to disassemble a single CPU instruction into textual representation and you don't need decoded information (TInstruction record).

 

See also




Send feedback... Build date: 2018-11-26
Last edited: 2018-11-26
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_edisasm_decodeinstruction.php