/// <summary> /// Set global = local (source: defaultsyms.txt). /// </summary> public static HITResult SetLG(HITThread thread) { var local = thread.ReadByte(); var global = thread.ReadInt32(); thread.VM.WriteGlobal(global, local); return(HITResult.CONTINUE); }
/// <summary> /// Write a 4-byte constant to a variable. /// </summary> public static HITResult LoadL(HITThread thread) { var dest = thread.ReadByte(); var value = thread.ReadInt32(); thread.WriteVar(dest, value); thread.SetFlags(value); return(HITResult.CONTINUE); }
/// <summary> /// Read globally, set locally (source: defaultsyms.txt). /// </summary> public static HITResult SetGL(HITThread thread) { var dest = thread.ReadByte(); var src = thread.ReadInt32(); int Global = thread.VM.ReadGlobal(src); thread.WriteVar(dest, Global); return(HITResult.CONTINUE); }
/// <summary> /// Find the lower of a "dest" variable and a "src" constant and store the result in the variable. /// </summary> public static HITResult Min(HITThread thread) { var dest = thread.ReadByte(); var src = thread.ReadInt32(); var result = Math.Min(thread.ReadVar(dest), src); thread.WriteVar(dest, result); thread.SetFlags(result); return(HITResult.CONTINUE); //unused in the sims }
/// <summary> /// Set global = local (source: defaultsyms.txt). /// </summary> public static HITResult SetLG(HITThread thread) { var local = thread.ReadByte(); var global = thread.ReadInt32(); thread.VM.WriteGlobal(global, local); return HITResult.CONTINUE; }
/// <summary> /// Read globally, set locally (source: defaultsyms.txt). /// </summary> public static HITResult SetGL(HITThread thread) { var dest = thread.ReadByte(); var src = thread.ReadInt32(); int Global = thread.VM.ReadGlobal(src); thread.WriteVar(dest, Global); return HITResult.CONTINUE; }
/// <summary> /// Find the lower of a "dest" variable and a "src" constant and store the result in the variable. /// </summary> public static HITResult Min(HITThread thread) { var dest = thread.ReadByte(); var src = thread.ReadInt32(); var result = Math.Min(thread.ReadVar(dest), src); thread.WriteVar(dest, result); thread.SetFlags(result); return HITResult.CONTINUE; //unused in the sims }
/// <summary> /// Write a 4-byte constant to a variable. /// </summary> public static HITResult LoadL(HITThread thread) { var dest = thread.ReadByte(); var value = thread.ReadInt32(); thread.WriteVar(dest, value); thread.SetFlags(value); return HITResult.CONTINUE; }