     if (j++ == 0 && nextByte == 255)    // EOF. Note that in MSBASIC, 255 means Pi.
       break;                            // So we only check this after a newline.
     sendController(nextByte, 2);        // A single frame is sometimes too fast
-    if (nextByte == 13)                 // "A carriage return takes more time"
+    if (nextByte == '\r')               // "A carriage return takes more time"
       lineDelay = 300 + j * 50;         // Reality: Micro-Soft BASIC is s-l-o-w
     delay((j % 26) ? 20                 // Allow Gigatron software to draw the char
                    : 300);              // And give more time at line wrap
-    if (nextByte == 10) {               // End of line
+    if (nextByte == '\n') {             // End of line
       delay(lineDelay);                 // Allow some extra time for line processing
       j = 0;                            // Start of new line
     }


        sendController(out, 2);
        ansi = false;
      }
    }
  #endif

void loop()
{
  // Check Gigatron's vPulse for incoming data
  // Save it into the EEPROM area if data received
  int inByte = vSyncByte();
  static byte hasChars;                 // Keeps track of partial lines
  if (inByte < 0) {
    if (inByte == -1)                   // Idle
      hasChars = false;                 // Be robust against partial lines
  } else {                              // Full byte received
    if (saveIndex < EEPROM_length)      // Store byte in EEPROM if possible
      EEPROM.write(saveIndex++, inByte);
    else if (hasChars)                  // Full, but only break if line is non-empty
      sendController(3, 10);            // Send long Ctrl-C back to stop sender
    if (inByte >= 32)
      hasChars = true;                  // Mark printable characters as non-empty
    else if (inByte == '\n') {
      if (!hasChars)                    // Empty lines delete the old program
        saveIndex = fileStart;
      if (saveIndex < EEPROM_length)    // EOF terminator
        EEPROM.write(saveIndex, 255);
      hasChars = false;
    }
  }

  // Game controller pass through (Courtesy norgate)
