示例#1
0
 public void Visit(PrintLn ps)
 {
     sw.WriteLine("\tld b," + game.GetStringId(ps.text) + " ; sub wants arg in b");
     sw.WriteLine("\tld ix,string_table");
     sw.WriteLine("\tcall print_table_entry");
     sw.WriteLine("\tcall printcr");
 }
示例#2
0
 public void Visit(PrintLn ps)
 {
     sw.WriteLine("\t;print statement");
     sw.WriteLine("\tlda #" + game.GetStringId(ps.text) + " ; /*" + ps.text + "*/");
     sw.WriteLine("\tpshs a");
     sw.WriteLine("\tlda #0");
     sw.WriteLine("\tpshs a");
     sw.WriteLine("\tjsr print_string");
     sw.WriteLine("\tleas 2,s ; pop params");
     sw.WriteLine("\tjsr printcr");
 }
        public void Visit(PrintLn ps)
        {
            sw.WriteLine("\t;building a println statement");

            sw.WriteLine("\tlda #<string_table");
            sw.WriteLine("\tsta tableAddr");
            sw.WriteLine("\tlda #>string_table");
            sw.WriteLine("\tsta tableAddr+1");
            sw.WriteLine("\tlda #" + game.GetStringId(ps.text) + " ; " + "\"" + ps.text + "\"");
            sw.WriteLine("\tjsr printix");
            sw.WriteLine("\tjsr printcr ; print newline");
        }
示例#4
0
 public void Visit(PrintLn ps)
 {
     sw.WriteLine("\tnop ;println statement");
     //sw.WriteLine("\tmov ax,StringTable");
     //sw.WriteLine("\tpush ax");
     sw.WriteLine("\tmov ah,0");
     sw.WriteLine("\tmov al," + game.GetStringId(ps.text) + " ; " + ps.text.Substring(0, Math.Min(ps.text.Length, 10)));
     sw.WriteLine("\tpush ax");
     sw.WriteLine("\tcall print_string");
     sw.WriteLine("\tadd sp,2  ; pop 2 bytes");
     sw.WriteLine("\tnop");
     sw.WriteLine("\tcall print_cr");
 }
 public void Visit(PrintLn ps)
 {
     sw.WriteLine(Tabs() + "print_string(" + game.GetStringId(ps.text) + "); ");
     sw.WriteLine(Tabs() + "print_cr();");
 }