Ejemplo n.º 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");
 }
Ejemplo n.º 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");
        }
Ejemplo n.º 3
0
 public void Visit(VariableRVal v)
 {
     sw.WriteLine(Tabs() + "// variable rval");
     sw.WriteLine(Tabs() + "param1 = " + FixVarName(v.VarName) + ";");
     sw.WriteLine(Tabs() + "param_stack.push(param1);");
 }
Ejemplo n.º 4
0
 public void Visit(VariableRVal v)
 {
     sw.WriteLine("\tlda " + game.GetVarAddr(v.VarName));
     sw.WriteLine("\tpha");
 }
Ejemplo n.º 5
0
 public void Visit(VariableRVal v)
 {
     sw.WriteLine("\t;load var");
     sw.WriteLine("\tld a,(" + game.GetVarAddr(v.VarName) + ")");
     sw.WriteLine("\tpush af");
 }