private void EmitStatics()
        {
            //In order to be slightly nicer to our callers, we emit statics in order of declaration.
              var staticVariables=new Static[staticVariableToInfo.Count];
              foreach(StaticVariableInfo vi in staticVariableToInfo.Values) {
            var staticVar=vi.Representation;
            staticVariables[staticVar.DeclarationIndex]=staticVar;
              }

              foreach(var staticVar in staticVariables) {
            emitter.AlignToWord();
            var label=staticVar.StorageLabel;
            label.Mark();
            var labelName=label.Name.ToString();
            var initialData=staticVar.InitialData;

            for(var i=0; i<initialData.Length; ++i) {
              var item=initialData[i];
              var lo=(short)(item&0xffff);
              var hi=(short)(item>>16);

              var loComment="lo("+item.ToHex()+")";
              var hiComment="hi("+item.ToHex()+")";

              var assemblerComment="word "+i+" of "+labelName;

              emitter.Emit(lo, loComment, assemblerComment);
              emitter.Emit(hi, hiComment, assemblerComment);
            }
              }
        }
 public StaticVariableInfo(TerminalName name, Static representation)
     : base(name, representation)
 {
 }
 public void BindStaticVariableToNewRepresentation(IReference variable, string name, int[] initialData)
 {
     var terminalName=CreateTerminalName(name);
       var label=new Label(terminalName);
       var representation=new Static(staticVariableToInfo.Count, label, initialData);
       staticVariableToInfo.CheckedAdd(variable, new StaticVariableInfo(terminalName, representation));
 }