public override void Execute(CPU cpu) { object value1 = cpu.PopStack(); object value2 = cpu.PopStack(); cpu.PushStack(value1); cpu.PushStack(value2); }
public override void Execute(CPU cpu) { object value = cpu.PopValue(); string identifier = (string)cpu.PopStack(); cpu.SetValue(identifier, value); }
public override void Execute(CPU cpu) { cpu.PopStack(); }
public override void Execute(CPU cpu) { object value = cpu.PopValue(); string suffixName = cpu.PopStack().ToString().ToUpper(); object specialValue = cpu.PopValue(); if (specialValue is SpecialValue) { if (!((SpecialValue)specialValue).SetSuffix(suffixName, value)) { throw new Exception(string.Format("Suffix {0} not found on object", suffixName)); } } else { throw new Exception(string.Format("Values of type {0} cannot have suffixes", specialValue.GetType().ToString())); } }
public override void Execute(CPU cpu) { object identifier = cpu.PopStack(); if (identifier != null) { cpu.RemoveVariable(identifier.ToString()); } else { cpu.RemoveAllVariables(); } }