     }
     
     virtual void printHelpString() const {
-      Serial.println("  burn_prog             burn the program into program memory");
+      Serial.println("  burn                  burn the program into program memory");
+    }
+};
+
+class EraseControl : public Command {
+  public:
+    virtual bool match(const String& name) const {
+      return name.startsWith("erase");
+    }
+    
+    virtual void execute(const String& commandString) {
+      if (!programmer->inProgrammingMode()) {
+        Serial.println("ERROR: Programmer not in programming mode");
+      } else {
+        programmer->erase();
+      }
+    }
+    
+    virtual void printHelpString() const {
+      Serial.println("  erase                 erases the program memory (mode depends on current PC location)");
+    }
+};
+
+
+
+class RewriteChipCommand : public Command {
+  public:
+    virtual bool match(const String& name) const {
+      return name.startsWith("rewrite");
+    }
+    
+    virtual void execute(const String& commandString) {
+      if (!programmer->inProgrammingMode()) {
+        Serial.println("ERROR: Programmer not in programming mode");
+      } else {
+        StringSplitter splitter(commandString, ' ', 2);
+
+        int count = 0;
+        if (splitter.getItemCount() <= 1) {
+          Serial.println("ERROR: Expected number of locations to rewrite");
+        } else {
+          String parameter = splitter.getItemAtIndex(1);
+          parameter.toLowerCase();
+          count = hexToInt(parameter);
+
+          int oldProgress = 0;
+          int newProgress = 0;
+          int i = 0;
+          while (i < count) {
+            newProgress = 10 * i / (count - 1);
+            if (newProgress != oldProgress) {
+              oldProgress = newProgress;
+              Serial.print(newProgress);
+              Serial.print("0% ...");
+            }
+            
+            int w = programmer->readWord();
+            programmer->writeWord(w);
+            programmer->burnProgram();
+            
+            programmer->incAddress();
+            i++;
+          }
+          Serial.println("done");
+        }
+      }
+    }
+    
+    virtual void printHelpString() const {
+      Serial.println("  rewrite number        reads and rewrites the the given number of addresses");
     }
 };
 

    bool incAddress() {
      if (_inProgrammingMode) {
        writeCommand(0x06);
        delayMicroseconds(PROGRAMMING_MODE_COMMAND_DELAY);
        location++;
        return true;
      }

          Serial.println();
          
          count--;
          if (count >= 0) {
            programmer->incAddress();
          }
        } while (count > 0);
      }
    }
    
    virtual void printHelpString() const {
      Serial.println("  read [count]          reads a word from the current memory location and displayes it as text");
    }
};

class WriteTextWordControl : public Command {
  public:
    virtual bool match(const String& name) const {
      return name.startsWith("write");
    }
    
    virtual void execute(const String& commandString) {
