// Parse and translate an assignment statement private void Assignment() { string name = Cradle.GetName(); Cradle.Match('='); Expression(); Cradle.EmitLn("LEA " + name + "(PC),A0"); Cradle.EmitLn("MOVE D0,(A0)"); }
// Parse and translate an identity private void Ident() { string name = Cradle.GetName(); if (Cradle.Look == '(') { Cradle.Match('('); Expression(); Cradle.Match(')'); Cradle.EmitLn("BSR " + name); } else { Cradle.EmitLn("MOVE " + name + "(PC),D0"); } }