 
             if (Modem_EchoOn)
             {
+                if (!Modem_flowControlEnabled) 
+                    delay(100);         // Slow down command mode to prevent garbage if flow control 
+                                        // is disabled.  Should be able to lower for higher speeds
+                                        // TODO:  Adapt for higher speeds.
                 C64Serial.write(inbound);
             }
 

// Main processing loop for the virtual modem.  Needs refactoring!
void Modem_Loop()
{
    boolean isConnected = wifly.isConnected();
    
    // Check for new remote connection
    if (!Modem_isConnected && !Modem_isRinging && isConnected)
    {
        wifly.println(F("CONNECTING TO SYSTEM."));
        Display(F("INCOMING\nCALL"));
        Modem_Ring();
        return;
    }

    // Check for a dropped remote connection while ringing
    if (Modem_isRinging && !isConnected)
    {
        Modem_Disconnect();
        return;
    }

    // Check for a dropped remote connection while connected
    if (Modem_isConnected && !isConnected)
    {
        Modem_Disconnect();
        return;
    }

    // If connected, handle incoming data	
    if (Modem_isConnected && isConnected)
    {
        // Echo an error back to remote terminal if in command mode.
        if (Modem_isCommandMode && wifly.available() > 0)
        {
            wifly.println(F("error: remote modem is in command mode."));
        }
        else
        {
            while (wifly.available() > 0)
            {
                C64Serial.write(wifly.read());
            }
        }
    }


    }

    wifly.close();
#ifdef HAYES          
    Modem_Disconnect();
    Display(F("Connection closed"));
#else
    DisplayBoth(F("Connection closed"));
#endif
#ifdef ENABLE_C64_DCD
    digitalWriteFast(C64_DCD, false);
#endif
