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


C# CPUx86类代码示例

本文整理汇总了C#中CPUx86的典型用法代码示例。如果您正苦于以下问题:C# CPUx86类的具体用法?C# CPUx86怎么用?C# CPUx86使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CPUx86类属于命名空间,在下文中一共展示了CPUx86类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

        public override void Execute(CPUx86 cpu, SimInstruction instruction)
        {
            uint address = GetAddress(cpu, instruction.Operand2);
            int size = instruction.Operand1.Size;

            StoreValue(cpu, instruction.Operand1, address, size);
        }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:7,代码来源:Lea.cs

示例2: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			if (IsSign(cpu.EAX.Value))
				cpu.EDX.Value = ~(uint)0;
			else
				cpu.EDX.Value = 0;
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Cdq.cs

示例3: Execute

 public override void Execute(CPUx86 cpu, SimInstruction instruction)
 {
     if (!cpu.EFLAGS.Zero)
     {
         StoreValue(cpu, instruction.Operand1, 1, 8);
     }
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:7,代码来源:Setnz.cs

示例4: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			if (!cpu.EFLAGS.Parity)
			{
				cpu.EIP.Value = ResolveBranch(cpu, instruction.Operand1);
			}
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Jnp.cs

示例5: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			var a = LoadFloatValue(cpu, instruction.Operand2, instruction.Operand1.Size);
			int size = instruction.Operand1.Size;

			StoreFloatValue(cpu, instruction.Operand1, a, size);
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Cvtss2sd.cs

示例6: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			var a = LoadFloatValue(cpu, instruction.Operand1, instruction.Size).Low;
			var b = LoadFloatValue(cpu, instruction.Operand2, instruction.Size).Low;
			int size = instruction.Size;

			if (double.IsNaN(a) || double.IsNaN(b))
			{
				cpu.EFLAGS.Zero = true;
				cpu.EFLAGS.Parity = true;
				cpu.EFLAGS.Carry = true;
			}
			else if (a == b)
			{
				cpu.EFLAGS.Zero = true;
				cpu.EFLAGS.Parity = false;
				cpu.EFLAGS.Carry = false;
			}
			else if (a > b)
			{
				cpu.EFLAGS.Zero = false;
				cpu.EFLAGS.Parity = false;
				cpu.EFLAGS.Carry = false;
			}
			else
			{
				cpu.EFLAGS.Zero = false;
				cpu.EFLAGS.Parity = false;
				cpu.EFLAGS.Carry = true;
			}

			cpu.EFLAGS.Overflow = false;
			cpu.EFLAGS.Adjust = false;
			cpu.EFLAGS.Sign = false;
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:35,代码来源:Ucomisd.cs

示例7: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			var r = LoadFloatValue(cpu, instruction.Operand1, instruction.Operand1.Size);
			int size = instruction.Operand1.Size;

			cpu.ST0.Value = r;
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Fld.cs

示例8: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			if (cpu.EFLAGS.Carry || cpu.EFLAGS.Zero)
			{
				cpu.EIP.Value = ResolveBranch(cpu, instruction.Operand1);
			}
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Jbe.cs

示例9: Execute

 public override void Execute(CPUx86 cpu, SimInstruction instruction)
 {
     if (cpu.EFLAGS.Sign != cpu.EFLAGS.Overflow)
     {
         StoreValue(cpu, instruction.Operand1, 1, 8);
     }
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:7,代码来源:Setle.cs

示例10: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			int a = (int)LoadValue(cpu, instruction.Operand2);
			int size = instruction.Operand1.Size;

			StoreFloatValue(cpu, instruction.Operand1, (double)a, size);
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Cvtsi2sd.cs

示例11: Execute

        public override void Execute(CPUx86 cpu, SimInstruction instruction)
        {
            double a = LoadFloatValue(cpu, instruction.Operand1);
            double b = LoadFloatValue(cpu, instruction.Operand2);
            int size = instruction.Operand1.Size;

            if (double.IsNaN(a) || double.IsNaN(b))
            {
                cpu.EFLAGS.Zero = true;
                cpu.EFLAGS.Parity = true;
                cpu.EFLAGS.Carry = true;
            }
            else if (a == b)
            {
                cpu.EFLAGS.Zero = true;
                cpu.EFLAGS.Parity = false;
                cpu.EFLAGS.Carry = false;
            }
            else if (a > b)
            {
                cpu.EFLAGS.Zero = false;
                cpu.EFLAGS.Parity = false;
                cpu.EFLAGS.Carry = false;
            }
            else
            {
                cpu.EFLAGS.Zero = false;
                cpu.EFLAGS.Parity = false;
                cpu.EFLAGS.Carry = true;
            }
        }
开发者ID:Boddlnagg,项目名称:MOSA-Project,代码行数:31,代码来源:Comisd.cs

示例12: Execute

        public override void Execute(CPUx86 cpu, SimInstruction instruction)
        {
            var a = LoadFloatValue(cpu, instruction.Operand1, instruction.Size);
            uint p = LoadValue(cpu, instruction.Operand2);
            int size = instruction.Size;

            float r;
            if ((p & 0x3) == 0x3)
            {
                r = (float)Math.Truncate(a.LowF);
            }
            else if ((p & 0x2) == 0x2)
            {
                r = (float)Math.Ceiling(a.LowF);
            }
            else if ((p & 0x1) == 0x1)
            {
                r = (float)Math.Floor(a.LowF);
            }
            else
            {
                r = (float)Math.Round(a.LowF);
            }

            StoreFloatValue(cpu, instruction.Operand1, r, size);
        }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:26,代码来源:Roundss.cs

示例13: Execute

		public override void Execute(CPUx86 cpu, SimInstruction instruction)
		{
			uint a = LoadValue(cpu, instruction.Operand2);
			int size = instruction.Operand1.Size;

			StoreValue(cpu, instruction.Operand1, a, size);
		}
开发者ID:yonglehou,项目名称:MOSA-Project,代码行数:7,代码来源:Movzx.cs

示例14: Execute

        public override void Execute(CPUx86 cpu, SimInstruction instruction)
        {
            uint a = LoadValue(cpu, instruction.Operand1);
            uint b = LoadValue(cpu, instruction.Operand2);
            int size = instruction.Operand1.Size;

            int shift = ((int)b) & 0x1F;

            if (shift == 0)
                return; // no changes

            uint u = a << shift;
            bool sign = IsSign(a, size);

            //if (cpu.FLAGS.Carry)
            //{
            //	u = u | 0x1;
            //}

            StoreValue(cpu, instruction.Operand1, u, size);

            UpdateFlags(cpu, size, u, u, true, true, true, false, false);

            cpu.EFLAGS.Overflow = sign ^ IsSign(u, size);
            cpu.EFLAGS.Carry = sign;
        }
开发者ID:Profi-Concept,项目名称:MOSA-Project,代码行数:26,代码来源:Shl.cs

示例15: Execute

 public override void Execute(CPUx86 cpu, SimInstruction instruction)
 {
     if (cpu.EFLAGS.Sign != cpu.EFLAGS.Overflow)
     {
         cpu.EIP.Value = ResolveBranch(cpu, instruction.Operand1);
     }
 }
开发者ID:pacificIT,项目名称:MOSA-Project,代码行数:7,代码来源:Jl.cs


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