LiteASM Documentation
Light Weight & Customizable Assembly Compiler & Virtual Machine
Status: Planning
Brought to you by:
dilshan
Function
function GetCycle() : Word;
Availability
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.
At cycle 0, both opcode and operand are undefined and read as 0.
Example
if(GetCycle()==0) then
begin
//load start up settings
end;
Documentation: Virtual Machine Simulator Scripting Functions