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))}); } }
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(); }