Beispiel #1
0
 /** Called when the contents of the memory are changed through the memory gui. */
 public void valueChanged(ComputerPartEvent event) {
   short newValue = event.getValue();
   int newAddress = event.getIndex();
   clearErrorListeners();
   try {
     HackAssemblerTranslator.getInstance().codeToText(newValue);
     setValueAt(newAddress, newValue, true);
   } catch (AssemblerException ae) {
     notifyErrorListeners("Illegal instruction");
     quietUpdateGUI(newAddress, mem[newAddress]);
   }
 }
 public void valueChanged(ComputerPartEvent event) {
   clearErrorListeners();
   updateValue(event.getValue());
 }