Index: src/debug.c
===================================================================
--- src/debug.c	(revision 18633)
+++ src/debug.c	(working copy)
@@ -238,7 +238,7 @@
 
 /*
 
-=item C<static const char*
+=item C<static const char *
 parse_command(const char *command, unsigned long *cmdP)>
 
 Convert the command at the beginning of a string into a numeric value
@@ -248,10 +248,10 @@
 
 */
 
-static const char*
+static const char *
 parse_command(const char *command, unsigned long *cmdP)
 {
-    int           i;
+    int i;
     unsigned long c = 0;
 
     if (*command == '\0') {
@@ -259,6 +259,9 @@
         return 0;
     }
 
+    /* while command is not NULL and the command is an alpha character ...
+     * don't know what this code does.
+     */
     for (i = 0; *command && isalpha((int) *command); command++, i++)
         c += (tolower((int) *command) + (i + 1)) * ((i + 1) * 255);
 
@@ -508,8 +511,7 @@
 =item C<void
 PDB_trace(Interp *interp, const char *command)>
 
-Execute the next N operations; if no number is specified, it defaults to
-1.
+Execute the next N operations; if no number is specified, it defaults to 1.
 
 =cut
 
@@ -522,15 +524,19 @@
     PDB_t         *pdb = interp->pdb;
     Interp        *debugee;
 
+    /* if debugger is not running yet, initialize */
     if (!(pdb->state & PDB_RUNNING))
         PDB_init(interp, command);
 
+    /* if the number of ops to run is specified, convert to a long */
     if (command && isdigit((int) *command))
         n = atol(command);
 
+    /* clear the PDB_STOPPED flag, we'll be running n ops now */
     pdb->state &= ~PDB_STOPPED;
     debugee     = pdb->debugee;
 
+    /* execute n ops */
     for (; n && pdb->cur_opcode; n--) {
         trace_op(debugee,
                 debugee->code->base.data,
@@ -540,6 +546,7 @@
         DO_OP(pdb->cur_opcode, debugee);
     }
 
+    /* set PDB_STOPPED flag, we just stopped */
     pdb->state |= PDB_STOPPED;
 
     /* If program ended */
@@ -549,8 +556,7 @@
 
 /*
 
-=item C<PDB_condition_t *
-PDB_cond(Interp *interp, const char *command)>
+=item C<PDB_condition_t *PDB_cond(Interp *interp, const char *command)>
 
 Analyzes a condition from the user input.
 
@@ -604,9 +610,13 @@
      * condition. */
     command++;
 
+    /* XXX Does /this/ have to do with the fact that PASM registers used to have
+     * maximum of 2 digits? If so, there should be a while loop, I think.
+     */
     if (condition->reg > 9)
         command++;
 
+    /* skip whitespace */
     if (*command == ' ')
         na(command);
 
@@ -646,11 +656,13 @@
             return NULL;
     }
 
+    /* if there's an '=', skip it */
     if (*(command + 1) == '=')
         command += 2;
     else
-        command ++;
+        command++;
 
+    /* skip whitespace */
     if (*command == ' ')
         na(command);
 
@@ -796,8 +808,7 @@
 
         /* Abort if the line number provided doesn't exist */
         if (!line->next) {
-            PIO_eprintf(interp,
-                        "Can't set a breakpoint at line number %li\n",ln);
+            PIO_eprintf(interp, "Can't set a breakpoint at line number %li\n",ln);
             return;
         }
     }
@@ -808,8 +819,7 @@
         while (line->opcode != pdb->cur_opcode) {
             line = line->next;
             if (!line) {
-                PIO_eprintf(interp,
-                   "No current line found and no line number specified\n");
+                PIO_eprintf(interp, "No current line found and no line number specified\n");
                 return;
             }
         }
@@ -948,10 +958,13 @@
     PDB_breakpoint_t *breakpoint;
     long              n;
 
+    /* check whether the command was a digit */
+    /* XXX Only check for first character? */
     if (isdigit((int) *command)) {
         n          = atol(command);
         breakpoint = interp->pdb->breakpoint;
 
+        /* iterate over the breakpoints to find breakpoint no. n. */
         while (breakpoint && breakpoint->id != n)
             breakpoint = breakpoint->next;
 
@@ -989,6 +1002,7 @@
 {
     PDB_breakpoint_t *breakpoint = PDB_find_breakpoint(interp, command);
 
+    /* if the breakpoint exists, disable it. */
     if (breakpoint)
         breakpoint->skip = -1;
 
@@ -1012,10 +1026,11 @@
 {
     PDB_breakpoint_t *breakpoint = PDB_find_breakpoint(interp, command);
 
-    if (breakpoint && breakpoint->skip == -1)
+    /* if the breakpoint exists, and it was disabled, enable it. */
+    if (breakpoint && breakpoint->skip == -1) {
         breakpoint->skip = 0;
+    }
 
-    return;
 }
 
 /*
@@ -1941,11 +1956,17 @@
 {
     char h = 0;
 
+    /* as long as c is not NULL, we're not looking at a comment (#...) or a '\n'... */
     while (*c && *c != '#' && *c != '\n') {
-        if (isalnum((int) *c) || *c == '"')
+        /* ... and c is alphanumeric or a quoted string ... */
+        if (isalnum((int) *c) || *c == '"') {
+            /* ... then the line contains an instruction. */
             h = 1;
-        else if (*c == ':')
+        }
+        else if (*c == ':') {
+            /* this is a label. XXX right? */
             h = 0;
+        }
         c++;
     }
 
