本文整理汇总了C#中EngineWarrior.SetPSpaceValue方法的典型用法代码示例。如果您正苦于以下问题:C# EngineWarrior.SetPSpaceValue方法的具体用法?C# EngineWarrior.SetPSpaceValue怎么用?C# EngineWarrior.SetPSpaceValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EngineWarrior
的用法示例。
在下文中一共展示了EngineWarrior.SetPSpaceValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: STP_AB_AiAi
public void STP_AB_AiAi(int ip, EngineWarrior warrior)
{
int reg_IR_ValueB;
int reg_IR_ValueCpyA = ValuesA[ip];
int reg_IR_ValueCpyB = ValuesB[ip];
int reg_AdrA;
int reg_AdrB;
int reg_AA_Value;
int reg_direct;
int reg_psAddress;
reg_direct = mod(reg_IR_ValueCpyA + ip);
reg_AdrA = mod(reg_direct + ValuesA[reg_direct]);
reg_AA_Value = ValuesA[reg_AdrA];
reg_direct = mod(reg_IR_ValueCpyB + ip);
reg_AdrB = mod(reg_direct + ValuesA[reg_direct]);
reg_IR_ValueB = ValuesB[reg_AdrB];
reg_psAddress = Instruction.Mod(reg_IR_ValueB, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_AA_Value);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例2: STP_X_ImIm
public void STP_X_ImIm(int ip, EngineWarrior warrior)
{
int reg_IR_ValueA;
int reg_IR_ValueB = ValuesB[ip];
int reg_psAddress;
reg_IR_ValueA = reg_IR_ValueB;
reg_psAddress = Instruction.Mod(reg_IR_ValueB, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_IR_ValueA);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例3: STP_X_ImBp
public void STP_X_ImBp(int ip, EngineWarrior warrior)
{
int reg_IR_ValueA;
int reg_IR_ValueB = ValuesB[ip];
int reg_IR_ValueCpyB = ValuesB[ip];
int reg_AdrB;
int reg_direct;
int reg_psAddress;
reg_IR_ValueA = reg_IR_ValueB;
reg_direct = mod(reg_IR_ValueCpyB + ip);
reg_AdrB = mod(reg_direct + ValuesB[reg_direct]);
reg_IR_ValueB = ValuesB[reg_AdrB];
inc(ref ValuesB[reg_direct]);
reg_psAddress = Instruction.Mod(reg_IR_ValueB, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_IR_ValueA);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例4: STP_X_DiIm
public void STP_X_DiIm(int ip, EngineWarrior warrior)
{
int reg_IR_ValueA;
int reg_IR_ValueB = ValuesB[ip];
int reg_IR_ValueCpyA = ValuesA[ip];
int reg_direct;
int reg_psAddress;
reg_direct = mod(reg_IR_ValueCpyA + ip);
reg_IR_ValueA = ValuesB[reg_direct];
reg_psAddress = Instruction.Mod(reg_IR_ValueB, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_IR_ValueA);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例5: STP_BA_DiBm
public void STP_BA_DiBm(int ip, EngineWarrior warrior)
{
int reg_IR_ValueA;
int reg_IR_ValueCpyA = ValuesA[ip];
int reg_IR_ValueCpyB = ValuesB[ip];
int reg_AdrB;
int reg_AB_Value;
int reg_direct;
int reg_psAddress;
reg_direct = mod(reg_IR_ValueCpyA + ip);
reg_IR_ValueA = ValuesB[reg_direct];
reg_direct = mod(reg_IR_ValueCpyB + ip);
reg_AdrB = mod(reg_direct + dec(ref ValuesB[reg_direct]));
reg_AB_Value = ValuesA[reg_AdrB];
reg_psAddress = Instruction.Mod(reg_AB_Value, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_IR_ValueA);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例6: STP_A_ImIm
public void STP_A_ImIm(int ip, EngineWarrior warrior)
{
int reg_AA_Value = ValuesA[ip];
int reg_AB_Value = ValuesA[ip];
int reg_psAddress;
reg_psAddress = Instruction.Mod(reg_AB_Value, rules.PSpaceSize);
warrior.SetPSpaceValue(reg_psAddress, reg_AA_Value);
ip++;
warrior.Tasks.Enqueue(mod(ip));
}
示例7: ExecuteInstruction
//.........这里部分代码省略.........
break;
case Modifier.BA:
this[reg.AdrB, Column.A] = reg.IR.ValueA;
break;
case Modifier.I:
BeforeRead(reg.AdrA, Column.All);
BeforeWrite(reg.AdrB, Column.All);
core[reg.AdrB].OriginalInstruction = core[reg.AdrA].OriginalInstruction;
core[reg.AdrB].OriginalOwner = core[reg.AdrA].OriginalOwner;
core[reg.AdrB].Operation = core[reg.AdrA].Operation;
core[reg.AdrB].Modifier = core[reg.AdrA].Modifier;
core[reg.AdrB].ModeA = core[reg.AdrA].ModeA;
core[reg.AdrB].ModeB = core[reg.AdrA].ModeB;
core[reg.AdrB].ValueA = reg.AA_Value;
core[reg.AdrB].ValueB = reg.IR.ValueA;
AfterWrite(reg.AdrB, Column.All);
break;
}
reg.ip++;
break;
#endregion
#region LDP
case Operation.LDP:
switch (reg.IR.Modifier)
{
case Modifier.A:
psAddress = Instruction.Mod(reg.AA_Value, rules.PSpaceSize);
this[reg.AdrB, Column.A] = warrior.GetPSpaceValue(psAddress);
break;
case Modifier.F:
case Modifier.B:
case Modifier.X:
case Modifier.I:
psAddress = Instruction.Mod(reg.IR.ValueA, rules.PSpaceSize);
this[reg.AdrB, Column.B] = warrior.GetPSpaceValue(psAddress);
break;
case Modifier.AB:
psAddress = Instruction.Mod(reg.AA_Value, rules.PSpaceSize);
this[reg.AdrB, Column.B] = warrior.GetPSpaceValue(psAddress);
break;
case Modifier.BA:
psAddress = Instruction.Mod(reg.IR.ValueA, rules.PSpaceSize);
this[reg.AdrB, Column.A] = warrior.GetPSpaceValue(psAddress);
break;
}
reg.ip++;
break;
#endregion
#region STP
case Operation.STP:
switch (reg.IR.Modifier)
{
case Modifier.A:
psAddress = Instruction.Mod(reg.AB_Value, rules.PSpaceSize);
BeforeWritePSpace(psAddress);
warrior.SetPSpaceValue(psAddress, reg.AA_Value);
break;
case Modifier.F:
case Modifier.B:
case Modifier.X:
case Modifier.I:
psAddress = Instruction.Mod(reg.IR.ValueB, rules.PSpaceSize);
BeforeWritePSpace(psAddress);
warrior.SetPSpaceValue(psAddress, reg.IR.ValueA);
break;
case Modifier.AB:
psAddress = Instruction.Mod(reg.IR.ValueB, rules.PSpaceSize);
BeforeWritePSpace(psAddress);
warrior.SetPSpaceValue(psAddress, reg.AA_Value);
break;
case Modifier.BA:
psAddress = Instruction.Mod(reg.AB_Value, rules.PSpaceSize);
BeforeWritePSpace(psAddress);
warrior.SetPSpaceValue(psAddress, reg.IR.ValueA);
break;
}
reg.ip++;
break;
#endregion
default:
throw new InvalidOperationException("Unknown instruction");
}
if (!die)
{
warrior.Tasks.Enqueue(mod(reg.ip));
}
else
{
warrior.DeadTasksCount++;
Died(reg.ip);
}
}