Beispiel #1
0
 public void Visit(VariableRVal v)
 {
     sw.WriteLine("\tnop ; variable rval");
     sw.WriteLine("\tmov ah,0");
     //            sw.WriteLine("\tmov al,[" + game.GetVarAddr(v.VarName) + "]");
     sw.WriteLine("\tmov al,[" + FixVarName(v.VarName) + "]");
     sw.WriteLine("\tpush ax");
 }
Beispiel #2
0
        public void Visit(VariableRVal v)
        {
            string addr;

            //this is done in fix var name()
            if (v.VarName == "dobj")
            {
                addr = "DobjId";
            }
            else if (v.VarName == "iobj")
            {
                addr = "IobjId";
            }
            else
            {
                addr = game.GetVarAddr(v.VarName);
            }

            sw.WriteLine("\tlda " + addr);
            sw.WriteLine("\tpshs a");
        }
 public void Visit(VariableRVal v)
 {
     sw.WriteLine(Tabs() + "// variable rval");
     sw.WriteLine(Tabs() + "param1 = " + FixVarName(v.VarName) + ";");
     sw.WriteLine(Tabs() + "param_stack.push(param1);");
 }
 public void Visit(VariableRVal v)
 {
     sw.WriteLine("\tlda " + game.GetVarAddr(v.VarName));
     sw.WriteLine("\tpha");
 }
Beispiel #5
0
 public void Visit(VariableRVal v)
 {
     sw.WriteLine("\t;load var");
     sw.WriteLine("\tld a,(" + game.GetVarAddr(v.VarName) + ")");
     sw.WriteLine("\tpush af");
 }