• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Reg16类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: FromName1W

 public static OpCode FromName1W(string op, Reg16 op1)
 {
     switch (op)
     {
         case "push":
             return OpCode.NewBytes(Util.GetBytes2(0x66, (byte)(0x50 + op1)));
         case "pop":
             return OpCode.NewBytes(Util.GetBytes2(0x66, (byte)(0x58 + op1)));
         case "inc":
             return OpCode.NewBytes(Util.GetBytes2(0x66, (byte)(0x40 + op1)));
         case "dec":
             return OpCode.NewBytes(Util.GetBytes2(0x66, (byte)(0x48 + op1)));
         case "not":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xd0 + op1)));
         case "neg":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xd8 + op1)));
         case "mul":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xe0 + op1)));
         case "imul":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xe8 + op1)));
         case "div":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xf0 + op1)));
         case "idiv":
             return OpCode.NewBytes(Util.GetBytes3(0x66, 0xf7, (byte)(0xf8 + op1)));
         default:
             throw new Exception("invalid operator: " + op);
     }
 }
开发者ID:7shi,项目名称:LLPML,代码行数:28,代码来源:I386.1.16.cs


示例2: FromNameW

 public static OpCode FromNameW(string op, Reg16 op1)
 {
     switch (op)
     {
         case "push":
             return new OpCode(new byte[] { 0x66, (byte)(0x50 + op1) });
         case "pop":
             return new OpCode(new byte[] { 0x66, (byte)(0x58 + op1) });
         case "inc":
             return new OpCode(new byte[] { 0x66, (byte)(0x40 + op1) });
         case "dec":
             return new OpCode(new byte[] { 0x66, (byte)(0x48 + op1) });
         case "not":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xd0 + op1) });
         case "neg":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xd8 + op1) });
         case "mul":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xe0 + op1) });
         case "imul":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xe8 + op1) });
         case "div":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xf0 + op1) });
         case "idiv":
             return new OpCode(new byte[] { 0x66, 0xf7, (byte)(0xf8 + op1) });
         default:
             throw new Exception("invalid operator: " + op);
     }
 }
开发者ID:bencz,项目名称:CoffLib,代码行数:28,代码来源:I386.1.16.cs


示例3: FromNameW

 public static OpCode FromNameW(string op, Reg32 op1, Reg16 op2)
 {
     byte b;
     switch (op)
     {
         case "movzx":
             b = 0xb7;
             break;
         case "movsx":
             b = 0xbf;
             break;
         default:
             throw new Exception("invalid operator: " + op);
     }
     return OpCode.NewBytes(Util.GetBytes3(0x0f, b, (byte)(0xc0 + (((int)op1) << 3) + op2)));
 }
开发者ID:7shi,项目名称:LLPML,代码行数:16,代码来源:I386.Movx.16.cs


示例4: FromNameWBA

 public static OpCode FromNameWBA(string op, Reg16 op1, Addr32 op2)
 {
     byte b;
     switch (op)
     {
         case "movzx":
             b = 0xb6;
             break;
         case "movsx":
             b = 0xbe;
             break;
         default:
             throw new Exception("invalid operator: " + op);
     }
     return OpCode.NewA(Util.GetBytes3(0x66, 0x0f, b), Addr32.NewAdM(op2, (byte)op1));
 }
开发者ID:7shi,项目名称:LLPML,代码行数:16,代码来源:I386.Movx.8.cs


示例5: FromNameB

 public static OpCode FromNameB(string op, Reg16 op1, Addr32 op2)
 {
     byte b;
     switch (op)
     {
         case "movzx":
             b = 0xb6;
             break;
         case "movsx":
             b = 0xbe;
             break;
         default:
             throw new Exception("invalid operator: " + op);
     }
     return new OpCode(new byte[] { 0x66, 0x0f, b }, null, new Addr32(op2, (byte)op1));
 }
开发者ID:bencz,项目名称:CoffLib,代码行数:16,代码来源:I386.Movx.8.cs


示例6: ShiftW

 public static OpCode ShiftW(string op, Reg16 op1, Reg8 op2)
 {
     byte b;
     switch (op)
     {
         case "shl":
         case "sal":
             b = (byte)(0xe0 + op1);
             break;
         case "shr":
             b = (byte)(0xe8 + op1);
             break;
         case "sar":
             b = (byte)(0xf8 + op1);
             break;
         default:
             throw new Exception("invalid operator: " + op);
     }
     if (op2 != Reg8.CL)
         throw new Exception("invalid register: " + op2);
     else
         return new OpCode(new byte[] { 0x66, 0xd3, b });
 }
开发者ID:bencz,项目名称:CoffLib,代码行数:23,代码来源:I386.Shift.16.cs


示例7: ShiftW

 public static OpCode ShiftW(string op, Reg16 op1, byte op2)
 {
     byte b;
     switch (op)
     {
         case "shl":
         case "sal":
             b = (byte)(0xe0 + op1);
             break;
         case "shr":
             b = (byte)(0xe8 + op1);
             break;
         case "sar":
             b = (byte)(0xf8 + op1);
             break;
         default:
             throw new Exception("invalid operator: " + op);
     }
     if (op2 == 1)
         return OpCode.NewBytes(Util.GetBytes3(0x66, 0xd1, b));
     else
         return OpCode.NewB(Util.GetBytes3(0x66, 0xc1, b), op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:23,代码来源:I386.Shift.16.cs


示例8: AndWRA

 public static OpCode AndWRA(Reg16 op1, Addr32 op2)
 {
     return FromName2WRA("and", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例9: CmpW

 public static OpCode CmpW(Reg16 op1, Reg16 op2)
 {
     return FromName2W("cmp", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例10: AndWAR

 public static OpCode AndWAR(Addr32 op1, Reg16 op2)
 {
     return FromName2WAR("and", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例11: AndWR

 public static OpCode AndWR(Reg16 op1, ushort op2)
 {
     return FromName2WR("and", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例12: SarWR

 public static OpCode SarWR(Reg16 op1, Reg8 op2)
 {
     return ShiftWR("sar", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.Shift.16.cs


示例13: TestWR

 public static OpCode TestWR(Reg16 op1, ushort op2)
 {
     return FromName2WR("test", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例14: XorWAR

 public static OpCode XorWAR(Addr32 op1, Reg16 op2)
 {
     return FromName2WAR("xor", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例15: ShlWR

 public static OpCode ShlWR(Reg16 op1, Reg8 op2)
 {
     return ShiftWR("shl", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.Shift.16.cs


示例16: XchgWRA

 public static OpCode XchgWRA(Reg16 op1, Addr32 op2)
 {
     return FromName2WRA("xchg", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例17: TestW

 public static OpCode TestW(Reg16 op1, Reg16 op2)
 {
     return FromName2W("test", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例18: XchgWAR

 public static OpCode XchgWAR(Addr32 op1, Reg16 op2)
 {
     return XchgWRA(op2, op1);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例19: XchgW

 public static OpCode XchgW(Reg16 op1, Reg16 op2)
 {
     return FromName2W("xchg", op1, op2);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs


示例20: TestWRA

 public static OpCode TestWRA(Reg16 op1, Addr32 op2)
 {
     return TestWAR(op2, op1);
 }
开发者ID:7shi,项目名称:LLPML,代码行数:4,代码来源:I386.2.16.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Reg32类代码示例发布时间:2022-05-24
下一篇:
C# RefreshedTypes类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap