public void loadPGM(String pgm) {
    waitForKernal();
    URL url = getResource(pgm);
    if (!reader.readPGM(url, -1))
      System.out.println("Status: problem while loading pgm");
    cpu.runBasic();
    canvas.requestFocus();
  }