当前位置: 首页>>代码示例>>C#>>正文


C# EngineWarrior.SetPSpaceValue方法代码示例

本文整理汇总了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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:22,代码来源:Fngine01InstructionsSTP.cs

示例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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:12,代码来源:Fngine01InstructionsSTP.cs

示例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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:19,代码来源:Fngine01InstructionsSTP.cs

示例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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:15,代码来源:Fngine01InstructionsSTP.cs

示例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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:20,代码来源:Fngine01InstructionsSTP.cs

示例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));
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:11,代码来源:Fngine01InstructionsSTP.cs

示例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);
            }
        }
开发者ID:pavelsavara,项目名称:nMars,代码行数:101,代码来源:Engine06Instructions.cs


注:本文中的EngineWarrior.SetPSpaceValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。