Example #1
0
  public void update() {
    if (type.compareTo("display") == 0) upDisp.update(this);
    else if (type.compareTo("LED") == 0)
      if (proc.mem[mem] != 0)
        setIcon(
            new javax.swing.ImageIcon(
                getClass().getResource("/_emulator/resources/pallet/ledLit.png")));
      else
        setIcon(
            new javax.swing.ImageIcon(
                getClass().getResource("/_emulator/resources/pallet/ledUnlit.png")));

    proc.updated = true;
  }
Example #2
0
  public void toggle() {
    if (this.status) proc.mem[mem] = (byte) ID;
    if (!this.status) proc.mem[mem] = (byte) (~ID);

    proc.updated = true;
  } // toggle