示例#1
0
 void fix_memory_table(JTable memoryTable) {
   DefaultTableModel model = new DefaultTableModel(new Object[] {"Address", "Content"}, 0);
   memoryTable.setModel(model);
   for (int i = 0; i < aa.getMemory().size(); i++) {
     model.addRow(new Object[] {aa.parse8DigitHex(i), aa.getMemory().get(aa.parse8DigitHex(i))});
   }
 }
示例#2
0
 public Computer() {
   runable = true;
   enableintrrupt = true;
   currentLineOfInstructions = 0;
   aa = new AddressAllocator();
   modeBit = true; // means in kernel Mode at first
   this.memory = "";
   for (int i = 0; i < aa.getMemory().size(); i++) {
     this.memory +=
         (aa.parse8DigitHex(i) + " : " + aa.getMemory().get(aa.parse8DigitHex(i)) + "\n");
   }
   //        cp0 = new CP0();
 }