DCPU16_ASM.Assembler.Parser.GenerateInstruction C# (CSharp) Method

GenerateInstruction() private method

private GenerateInstruction ( uint opcode, string param ) : void
opcode uint
param string
return void
		void GenerateInstruction(uint opcode, string param)
		{
            OpcodeParamResult p1 = this.ParseParam(param);
            opcode |= ((uint)p1.Param << 10) & 0xFC00;

            this.machineCode.Add((ushort)opcode);

            if (p1.NextWord)
            {
                if (p1.LabelName.Length > 0)
                {
                    this.labelReferences.Add((ushort)this.machineCode.Count, p1.LabelName);
                }

                this.machineCode.Add(p1.NextWordValue);
            }
		}

Same methods

Parser::GenerateInstruction ( uint opcode, string param1, string param2 ) : void