public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { aOutput.Write(mMnemonic); aOutput.Write(" "); aOutput.Write(SizeToString(Size)); if (!DestinationEmpty) { aOutput.Write(" "); aOutput.Write(this.GetDestinationAsString()); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { aOutput.Write(mMnemonic); String destination = this.GetDestinationAsString(); if (!(DestinationEmpty && destination.Equals(""))) { aOutput.Write(" "); aOutput.Write(destination); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { aOutput.Write(mMnemonic); String destination = this.GetDestinationAsString(); if (!destination.Equals("")) { aOutput.Write(" "); aOutput.Write(destination); string source = this.GetSourceAsString(); if (!(SourceEmpty && source.Equals(""))) { aOutput.Write(", "); aOutput.Write(source); } } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { switch (Size) { case 32: aOutput.Write("cdq"); return; case 16: aOutput.Write("cwde"); return; case 8: aOutput.Write("cbw"); return; default: throw new NotSupportedException(); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { aOutput.Write(mMnemonic); aOutput.Write(" "); aOutput.Write(this.GetDestinationAsString()); aOutput.Write(", "); aOutput.Write(this.GetSourceAsString()); aOutput.Write(", "); aOutput.Write(this.pseudoOpcode); }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { if ((Prefixes & InstructionPrefixes.Repeat) != 0) { aOutput.Write("rep "); } switch (Size) { case 32: aOutput.Write("stosd"); return; case 16: aOutput.Write("stosw"); return; case 8: aOutput.Write("stosb"); return; default: throw new Exception("Size not supported!"); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { if (DestinationRef != null) { aOutput.Write("jmp "); aOutput.Write(Segment); aOutput.Write(":"); aOutput.Write(DestinationRef.ToString()); } else { aOutput.Write("jmp "); aOutput.Write(Segment); aOutput.Write(":0x0"); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { if (Size == 0) { Size = 32; //Console.WriteLine("ERRROR no size set for Instruction - set to 4 InstructionWithDestinationAndSourceAndSize") ; } aOutput.Write(mMnemonic); aOutput.Write(" "); aOutput.Write(SizeToString(Size)); if (!DestinationEmpty) { aOutput.Write(" "); aOutput.Write(this.GetDestinationAsString()); aOutput.Write(", "); aOutput.Write(this.GetSourceAsString()); } }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { switch (Condition) { case FloatConditionalMoveTestEnum.Below: aOutput.Write("fcmovb"); break; case FloatConditionalMoveTestEnum.Equal: aOutput.Write("fcmove"); break; case FloatConditionalMoveTestEnum.BelowOrEqual: aOutput.Write("fcmovbe"); break; case FloatConditionalMoveTestEnum.Unordered: aOutput.Write("fcmovu"); break; case FloatConditionalMoveTestEnum.NotBelow: aOutput.Write("fcmovnb"); break; case FloatConditionalMoveTestEnum.NotEqual: aOutput.Write("fcmovne"); break; case FloatConditionalMoveTestEnum.NotBelowOrEqual: aOutput.Write("fcmovnbe"); break; case FloatConditionalMoveTestEnum.Ordered: aOutput.Write("fcmovnu"); break; } aOutput.Write(" "); aOutput.Write("ST0"); aOutput.Write(", "); aOutput.Write(this.GetSourceAsString()); }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { aOutput.Write("extern "); aOutput.Write(Name); }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { base.WriteText(aAssembler, aOutput); aOutput.Write(", DX"); }
public static void WriteToFile(XzaarAssembly xzaarAssembly, string filename) { var writer = new AssemblyWriter(); writer.Write(new AssemblyWriterContext(xzaarAssembly, filename)); }
public override void WriteText(NCAsm.AsmContext aAssembler, AssemblyWriter aOutput) { //TODO: In base have a property that has the opcode from above and we can reuse it. aOutput.Write("Int " + DestinationValue.Value.ToString("X2") + "h"); }