public override void Execute(CPU cpu) { object waitTime = cpu.PopValue(); if (waitTime is double) { cpu.StartWait((double)waitTime); } else if (waitTime is int) { cpu.StartWait((int)waitTime); } }
public override void Execute(CPU cpu) { int functionPointer = (int)cpu.PopValue(); cpu.AddTrigger(functionPointer); if (shouldWait) { cpu.StartWait(0); } }