Ejemplo n.º 1
0
        static void TestAssemblyWriter()
        {
            using (var aw = new AssemblyWriter()
            {
                Indentation = "  ",
                IndentInstructions = true,
                IndentDirectives = false,
            })
            {
                aw.WriteLine("This is a comment.");
                aw.WriteLine("As is this.");
                aw.WriteLine(AssemblyLine.Label("TEST", -1));
                aw.WriteLine(AssemblyLine.Instruction("add", new[] { "r1", "r2", "r2" }, -1));

                Console.WriteLine(aw);
            }
        }
Ejemplo n.º 2
0
 // This is a hack for now to just get DR6 support. DR can only be used with move, so its best to keep it a separate
 // op anwyays and not give it general support in the register list.
 // We we clean up the assemblers take this into consideration.
 public override void WriteText(AsmContext aAssembler, AssemblyWriter aOutput)
 {
     aOutput.WriteLine("mov DR6, " + mValue);
 }