Menu

GetCycle

Function

function GetCycle() : Word;

Availability

  • In Revision 0 and newer versions

Description

This function is use to get the current VCPU cycle number. In normal execution mode cycle counter start from 0 and get reset to 1 when it reach to 0xFFFF. 0th cycle appears only at the VCPU start-up.

VCPU Execution Cycles

At cycle 0, both opcode and operand are undefined and read as 0.

Example

if(GetCycle()==0) then 
begin
    //load start up settings
end;

Related

Documentation: Virtual Machine Simulator Scripting Functions