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

C# Opcode类代码示例

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

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



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

示例1: Instruction

 public Instruction(Location location, Opcode opcode)
     : this()
 {
     OperationCode = opcode;
     Argument = 0;
     Location = location;
 }
开发者ID:iwatakeshi,项目名称:Iodine,代码行数:7,代码来源:Instruction.cs


示例2: WithOpcode

        public IFrameBuilder WithOpcode(Opcode opcode)
        {
            switch(opcode)
            {
                case(Opcode.Binary):
                    _opcode = new byte[] { 0, 0, 1, 0 };
                    break;
                case(Opcode.ConnectionClose):
                    _opcode = new byte[] { 1, 0, 0, 0 };
                    break;
                case (Opcode.Continuation):
                    _isFinal = 0;
                    _opcode = new byte[] { 0, 0, 0, 0 };
                    break;
                case (Opcode.Ping):
                    _opcode = new byte[] { 1, 0, 0, 1 };
                    break;
                case (Opcode.Pong):
                    _opcode = new byte[] { 1, 0, 1, 0 };
                    break;
                case (Opcode.Text):
                    _opcode = new byte[] { 0, 0, 0, 1 };
                    break;
                default:
                    _isFinal = 1;
                    break;
            }

            return this;
        }
开发者ID:roffster,项目名称:WuSS,代码行数:30,代码来源:Hybi10ControlFrameBuilder.cs


示例3: Decode

        public void Decode()
        {
            Opcode = (Opcode)_machine.Memory[_machine.IP++];

            var b1 = _machine.Memory[_machine.IP++];
            var b2 = _machine.Memory[_machine.IP++];
            var b3 = _machine.Memory[_machine.IP++];

            var left = b1 >> 4;
            var leftPtr = (b3 & 0x80) != 0;
            var leftOffset = (b3 & 0x40) != 0;
            var leftOffsetReg = b2 >> 4;
            var leftType = (b3 >> 4) & 0x03;
            var leftPayload = ReadPayload(left);

            var right = b1 & 0x0F;
            var rightPtr = (b3 & 0x08) != 0;
            var rightOffset = (b3 & 0x04) != 0;
            var rightOffsetReg = b2 & 0x0F;
            var rightType = b3 & 0x03;
            var rightPayload = ReadPayload(right);

            Left.Change(left, leftType, leftPtr, leftOffset, leftOffsetReg, leftPayload);
            Right.Change(right, rightType, rightPtr, rightOffset, rightOffsetReg, rightPayload);
        }
开发者ID:Rohansi,项目名称:LoonyVM,代码行数:25,代码来源:Instruction.cs


示例4: unchecked

		/// <summary>
		/// push simple value (this, null, false, ...)
		/// </summary>
		void Parser.IGenerator.Push( Opcode opcode )
		{
			var start = ValsAt;
			Vneed( 5 );
			Vpush( unchecked((byte)opcode) );
			Vpush( start );
		}//Parser.IGenerator.Push
开发者ID:firda-cze,项目名称:bee,代码行数:10,代码来源:code-vals.cs


示例5: Instruction

		public Instruction (SourceLocation location, Opcode opcode, int arg)
			: this ()
		{
			OperationCode = opcode;
			Argument = arg;
			Location = location;
		}
开发者ID:GruntTheDivine,项目名称:Iodine,代码行数:7,代码来源:Instruction.cs


示例6: ParserAttribute

 // [addedInVersion, removedInVersion[
 public ParserAttribute(Opcode opcode, ClientVersionBuild addedInVersion, ClientVersionBuild removedInVersion)
 {
     if (ClientVersion.AddedInVersion(addedInVersion) && ClientVersion.RemovedInVersion(removedInVersion))
         Opcode = Opcodes.GetOpcode(opcode);
     else
         Opcode = 0;
 }
开发者ID:kandera,项目名称:WowPacketParser,代码行数:8,代码来源:ParserAttribute.cs


示例7: AssemblerInstruction

 public AssemblerInstruction()
 {
     Line = -1;
     Opcode = Opcode.None;
     Left = null;
     Right = null;
 }
开发者ID:Rohansi,项目名称:Programe,代码行数:7,代码来源:AssemblerInstruction.cs


示例8: Binary

		}//Literal
		
		protected override void Binary( Opcode op, byte[] code, ref int at )
		{
			var paren = Parens;
			if( paren )
			{
				Write( '(' );
			}
			if( op == Opcode.Cast )
			{
				Typeref( code, ref at );
				Write( "! " );
				Expression( code, ref at );
				if( paren )
				{
					Write( ')' );
				}
				return;
			}
			Expression( code, ref at );
			Write( ' ' );
			Write( op.Text() );
			Write( ' ' );
			if( (op == Opcode.LogicAnd) || (op == Opcode.LogicOr) )
			{
				at += 4;
			}
			Expression( code, ref at );
			if( paren )
			{
				Write( ')' );
			}
		}//Binary
开发者ID:firda-cze,项目名称:bee,代码行数:34,代码来源:bsgen-expr.cs


示例9: Unary

		}//Binary
		
		protected override void Unary( Opcode op, byte[] code, ref int at )
		{
			var paren = Parens;
			if( paren )
			{
				Write( '(' );
			}
			var text = op.Text();
			var post = op.Postfix();
			if( !post )
			{
				Write( text );
				if( text.Length > 2 )
				{
					Write( ' ' );
				}
			}
			Expression( code, ref at );
			if( post )
			{
				Write( text );
			}
			if( paren )
			{
				Write( ')' );
			}
		}//Unary
开发者ID:firda-cze,项目名称:bee,代码行数:29,代码来源:bsgen-expr.cs


示例10: ShiftOperand

 public ShiftOperand(MachineOperand op, Opcode opcode, MachineOperand shAmt)
     : base(op.Width)
 {
     this.Operand = op;
     this.Opcode = opcode;
     this.Shift = shAmt;
 }
开发者ID:killbug2004,项目名称:reko,代码行数:7,代码来源:ShiftOperand.cs


示例11: Literal

		}//Parens
		
		protected override void Literal( Opcode op, byte[] code, ref int at )
		{
			if( op != Opcode.Ident )
			{
				base.Literal( op, code, ref at );
				return;
			}
			var n = code[at++];
			var s = Encoding.UTF8.GetString( code, at, n );
			at += n;
			if( Aliasing == Alias.None )
			{
				if( s[0] == '$' )
				{
					s = s.Substring( 1 );
				}
				if( HasBuiltin( s ) )
				{
					Write( '@' );
				}
				Write( s );
				return;
			}
			if( Inside == Opcode.Dot )
			{
				Name.Append( s );
				return;
			}
			Write( Unalias( s ) );
		}//Literal
开发者ID:firda-cze,项目名称:bee,代码行数:32,代码来源:csgen-expr.cs


示例12: Request

        public Request()
        {
            _recursionDesired = true;
            Opcode = Opcode.StandardQuery;

            _questions = new List<Query>();
        }
开发者ID:nnikos123,项目名称:sharppjsip,代码行数:7,代码来源:Request.cs


示例13: IsServerMessage

		public static bool IsServerMessage(Opcode opcode)
		{
			if ((ushort)opcode > 10000 && (ushort)opcode < 20000)
			{
				return true;
			}
			return false;
		}
开发者ID:adan830,项目名称:Egametang,代码行数:8,代码来源:OpcodeHelper.cs


示例14: Packet

 public Packet(Opcode opc)
 {
     Opcode = opc;
     Length = 0;  // whole packet size
     Buffer  = new byte[4096];
     currentByteCount = 4;
     currentReadIndex = 4;
 }
开发者ID:gdpaulmil,项目名称:WPF_ServerClient,代码行数:8,代码来源:Packet.cs


示例15: StorageCommand

 public StorageCommand(Opcode cmdType, string key, uint flags, long expirationTimeInSeconds, int dataSize)
     : base(cmdType)
 {
     _key = key;
     _flags = flags;
     _expirationTimeInSeconds = expirationTimeInSeconds;
     _dataSize = dataSize;
 }
开发者ID:javithalion,项目名称:NCache,代码行数:8,代码来源:StorageCommand.cs


示例16: IsClientMessage

		public static bool IsClientMessage(Opcode opcode)
		{
			if ((ushort)opcode > 0 && (ushort)opcode < 10000)
			{
				return true;
			}
			return false;
		}
开发者ID:adan830,项目名称:Egametang,代码行数:8,代码来源:OpcodeHelper.cs


示例17: ObjResponse

 public ObjResponse()
 {
     m_name = "Response";
       m_opcode = Opcode.none;
       m_arguments = new ArrayList();
       m_arguments.Add("");
       m_arguments.Add("");
 }
开发者ID:captain-mayhem,项目名称:captainsengine,代码行数:8,代码来源:ObjResponse.cs


示例18: x86CPU

 public x86CPU(Config cfg)
 {
     _cfg = cfg;
     Registers = new Registers();
     State = new CPUState();
     Memmory = new Memmory(_cfg);
     _opcode = new Opcode();
 }
开发者ID:Myvar,项目名称:MyvarVM,代码行数:8,代码来源:x86CPU.cs


示例19: AddOpcode

 private Opcode AddOpcode(Opcode opcode, string destinationLabel)
 {
     opcode.Label = GetNextLabel(true);
     opcode.DestinationLabel = destinationLabel;
     _currentCodeSection.Add(opcode);
     _addBranchDestination = false;
     return opcode;
 }
开发者ID:ElasticRaven,项目名称:KOS,代码行数:8,代码来源:Compiler.cs


示例20: AddToBreakList

 private void AddToBreakList(Opcode opcode)
 {
     if (_breakList.Count > 0)
     {
         List<Opcode> list = _breakList[_breakList.Count - 1];
         list.Add(opcode);
     }
 }
开发者ID:ElasticRaven,项目名称:KOS,代码行数:8,代码来源:Compiler.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# OpenCbsCommand类代码示例发布时间:2022-05-24
下一篇:
C# OpType类代码示例发布时间: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