Menu

InstructionData

Function

function InstructionData() : TInstruction;

Availability

  • In Revision 0 and newer versions

Description

Return the op-code and operand part of the current instruction. This function returns both op-code and operand values through the TInstruction record and it is organized as follows:

TInstruction = record 
    Operand : Word; 
    Operation : Byte; 
end;

In exception both the parameters of TInstruction returns as 0.

Example

var
    TempInstruction : TInstruction;
begin
    TempInstruction := InstructionData();
    if(TempInstruction.Operation = 08) then 
        Terminate();        
end;

Related

Documentation: Virtual Machine Simulator Scripting Functions